internal virtual DisassociateMembershipResponse DisassociateMembership(DisassociateMembershipRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = DisassociateMembershipRequestMarshaller.Instance;
            options.ResponseUnmarshaller = DisassociateMembershipResponseUnmarshaller.Instance;

            return(Invoke <DisassociateMembershipResponse>(request, options));
        }
        /// <summary>
        /// Removes the member account from the specified behavior graph. This operation can only
        /// be called by a member account that has the <code>ENABLED</code> status.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the DisassociateMembership service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the DisassociateMembership service method, as returned by Detective.</returns>
        /// <exception cref="Amazon.Detective.Model.ConflictException">
        /// The request attempted an invalid action.
        /// </exception>
        /// <exception cref="Amazon.Detective.Model.InternalServerException">
        /// The request was valid but failed because of a problem with the service.
        /// </exception>
        /// <exception cref="Amazon.Detective.Model.ResourceNotFoundException">
        /// The request refers to a nonexistent resource.
        /// </exception>
        /// <exception cref="Amazon.Detective.Model.ValidationException">
        /// The request parameters are invalid.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DisassociateMembership">REST API Reference for DisassociateMembership Operation</seealso>
        public virtual Task <DisassociateMembershipResponse> DisassociateMembershipAsync(DisassociateMembershipRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = DisassociateMembershipRequestMarshaller.Instance;
            options.ResponseUnmarshaller = DisassociateMembershipResponseUnmarshaller.Instance;

            return(InvokeAsync <DisassociateMembershipResponse>(request, options, cancellationToken));
        }