public Builder affinity(@Nullable Output<AffinityPatchArgs> affinity) {
            $.affinity = affinity;
            return this;
        }
@param affinity If specified, the pod&#39;s scheduling constraints

@return builder
sdk/java/src/main/java/com/pulumi/kubernetes/core/v1/inputs/PodSpecPatchArgs.java