The second question is the correct one.
A direct question may start with a) an interrogative word/expression or, b) with an auxiliary.
Ex a) **What** is your availability of coming to Germany? As you can see the subject "your availability of coming to Germany" comes after the main verb or, if you have an auxiliary accompanying the main verb, it comes in between.(Changing the tense- ex- What will your availability of coming to Germany be?
But, what happens to this question if you place something before like "when he asked me..?- (in this case, to report something), - THE ORDER OF THE DIRECT QUESTION CHANGES AND, after the question word, immediately comes the subject and, AFTER IT, the verb(s),so
" when he asked me WHAT my availability of coming to Germany WAS..."(would be the correct one)
The previous information refers directly to the question you are asking about but there is much more to learn about this topic,
In case you are interested...(email@example.com)