Skip to content

How do I skip shapes with certain data type? #2248

Answered by jdisanti
thomas-k-cameron asked this question in Q&A
Discussion options

You must be logged in to vote

You can use this MemberShape.isEventStream function to determine if the member of a StructureShape is an event stream type (@streaming union).

So perhaps something like:

// If none of the members are event stream
if (structShape.members.none { it.isEventStream(model) }) {
    // add ser/de attributes
}

Replies: 6 comments 24 replies

Comment options

You must be logged in to vote
9 replies
@jdisanti
Comment options

@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

Answer selected by thomas-k-cameron
Comment options

You must be logged in to vote
3 replies
@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

Comment options

You must be logged in to vote
3 replies
@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

@ysaito1001
Comment options

Comment options

You must be logged in to vote
1 reply
@thomas-k-cameron
Comment options

Comment options

You must be logged in to vote
3 replies
@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

Comment options

You must be logged in to vote
5 replies
@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

@thomas-k-cameron
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants