union-type-wrappers

Official

Type-safe access to BinaryData union types.

AuthorAzure
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses the challenge of accessing data within BinaryData fields in generated Java models when those fields represent TypeSpec union types, providing a more ergonomic and type-safe way to interact with them.

Core Features & Use Cases

  • Typed Getters and Setters: Replaces generic BinaryData accessors with specific methods for each union variant (e.g., getString(), getSomeModel(), setSomeModel(SomeModel value)).
  • Ergonomic Access: Simplifies interacting with union types, avoiding manual serialization/deserialization of BinaryData.
  • Use Case: When a generated Java model has a field like BinaryData myField that can be either a String or a MyModel object, this skill adds methods like getMyFieldAsString() and setMyField(MyModel value) for cleaner code.

Quick Start

Use the union-type-wrappers skill to add typed getters and setters for the BinaryData field 'myField' in the generated Java model.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: union-type-wrappers
Download link: https://github.com/Azure/azure-sdk-for-java/archive/main.zip#union-type-wrappers

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.