﻿/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#pragma once
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/logs/CloudWatchLogsRequest.h>
#include <aws/logs/CloudWatchLogs_EXPORTS.h>

#include <utility>

namespace Aws {
namespace CloudWatchLogs {
namespace Model {

/**
 */
class GetLogGroupFieldsRequest : public CloudWatchLogsRequest {
 public:
  AWS_CLOUDWATCHLOGS_API GetLogGroupFieldsRequest() = default;

  // Service request name is the Operation name which will send this request out,
  // each operation should has unique request name, so that we can get operation's name from this request.
  // Note: this is not true for response, multiple operations may have the same response name,
  // so we can not get operation's name from response.
  inline virtual const char* GetServiceRequestName() const override { return "GetLogGroupFields"; }

  AWS_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override;

  AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

  ///@{
  /**
   * <p>The name of the log group to search.</p>  <p> You must include either
   * <code>logGroupIdentifier</code> or <code>logGroupName</code>, but not both. </p>
   *
   */
  inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
  inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
  template <typename LogGroupNameT = Aws::String>
  void SetLogGroupName(LogGroupNameT&& value) {
    m_logGroupNameHasBeenSet = true;
    m_logGroupName = std::forward<LogGroupNameT>(value);
  }
  template <typename LogGroupNameT = Aws::String>
  GetLogGroupFieldsRequest& WithLogGroupName(LogGroupNameT&& value) {
    SetLogGroupName(std::forward<LogGroupNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The time to set as the center of the query. If you specify <code>time</code>,
   * the 8 minutes before and 8 minutes after this time are searched. If you omit
   * <code>time</code>, the most recent 15 minutes up to the current time are
   * searched.</p> <p>The <code>time</code> value is specified as epoch time, which
   * is the number of seconds since <code>January 1, 1970, 00:00:00 UTC</code>.</p>
   */
  inline long long GetTime() const { return m_time; }
  inline bool TimeHasBeenSet() const { return m_timeHasBeenSet; }
  inline void SetTime(long long value) {
    m_timeHasBeenSet = true;
    m_time = value;
  }
  inline GetLogGroupFieldsRequest& WithTime(long long value) {
    SetTime(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specify either the name or ARN of the log group to view. If the log group is
   * in a source account and you are using a monitoring account, you must specify the
   * ARN.</p>  <p> You must include either <code>logGroupIdentifier</code> or
   * <code>logGroupName</code>, but not both. </p>
   */
  inline const Aws::String& GetLogGroupIdentifier() const { return m_logGroupIdentifier; }
  inline bool LogGroupIdentifierHasBeenSet() const { return m_logGroupIdentifierHasBeenSet; }
  template <typename LogGroupIdentifierT = Aws::String>
  void SetLogGroupIdentifier(LogGroupIdentifierT&& value) {
    m_logGroupIdentifierHasBeenSet = true;
    m_logGroupIdentifier = std::forward<LogGroupIdentifierT>(value);
  }
  template <typename LogGroupIdentifierT = Aws::String>
  GetLogGroupFieldsRequest& WithLogGroupIdentifier(LogGroupIdentifierT&& value) {
    SetLogGroupIdentifier(std::forward<LogGroupIdentifierT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_logGroupName;

  long long m_time{0};

  Aws::String m_logGroupIdentifier;
  bool m_logGroupNameHasBeenSet = false;
  bool m_timeHasBeenSet = false;
  bool m_logGroupIdentifierHasBeenSet = false;
};

}  // namespace Model
}  // namespace CloudWatchLogs
}  // namespace Aws
