/// <summary>
        /// Creates a new behavior graph for the calling account, and sets that account as the
        /// master account. This operation is called by the account that is enabling Detective.
        ///
        ///
        /// <para>
        /// Before you try to enable Detective, make sure that your account has been enrolled
        /// in Amazon GuardDuty for at least 48 hours. If you do not meet this requirement, you
        /// cannot enable Detective. If you do meet the GuardDuty prerequisite, then when you
        /// make the request to enable Detective, it checks whether your data volume is within
        /// the Detective quota. If it exceeds the quota, then you cannot enable Detective.
        /// </para>
        ///
        /// <para>
        /// The operation also enables Detective for the calling account in the currently selected
        /// Region. It returns the ARN of the new behavior graph.
        /// </para>
        ///
        /// <para>
        ///  <code>CreateGraph</code> triggers a process to create the corresponding data tables
        /// for the new behavior graph.
        /// </para>
        ///
        /// <para>
        /// An account can only be the master account for one behavior graph within a Region.
        /// If the same account calls <code>CreateGraph</code> with the same master account, it
        /// always returns the same behavior graph ARN. It does not create a new behavior graph.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the CreateGraph 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 CreateGraph 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.ServiceQuotaExceededException">
        /// This request cannot be completed for one of the following reasons.
        ///
        ///  <ul> <li>
        /// <para>
        /// The request would cause the number of member accounts in the behavior graph to exceed
        /// the maximum allowed. A behavior graph cannot have more than 1000 member accounts.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// The request would cause the data rate for the behavior graph to exceed the maximum
        /// allowed.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// Detective is unable to verify the data rate for the member account. This is usually
        /// because the member account is not enrolled in Amazon GuardDuty.
        /// </para>
        ///  </li> </ul>
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateGraph">REST API Reference for CreateGraph Operation</seealso>
        public virtual Task <CreateGraphResponse> CreateGraphAsync(CreateGraphRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CreateGraphRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CreateGraphResponseUnmarshaller.Instance;

            return(InvokeAsync <CreateGraphResponse>(request, options, cancellationToken));
        }
        internal virtual CreateGraphResponse CreateGraph(CreateGraphRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CreateGraphRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CreateGraphResponseUnmarshaller.Instance;

            return(Invoke <CreateGraphResponse>(request, options));
        }