Conditionally computed

I am writing a Resource which has name (string) and generate_name (bool) as arguments.
Now if generate_name is true it would be semantically best if name would switch to computed.
Is this possible at all?

@abergmeier

Would it be possible to share an example/ideal block so I can understand better what you are describing?

Thanks!