New York’s governor called the decision ‘shocking,’ and is preparing legislation in response.