public Optional<Output<AffinityArgs>> affinity() {
        return Optional.ofNullable(this.affinity);
    }
@return If specified, the pod&#39;s scheduling constraints
sdk/java/src/main/java/com/pulumi/kubernetes/core/v1/inputs/PodSpecArgs.java