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

#pragma once
#include <aws/kinesisanalytics/KinesisAnalytics_EXPORTS.h>
#include <aws/kinesisanalytics/model/MappingParameters.h>
#include <aws/kinesisanalytics/model/RecordFormatType.h>

#include <utility>

namespace Aws {
namespace Utils {
namespace Json {
class JsonValue;
class JsonView;
}  // namespace Json
}  // namespace Utils
namespace KinesisAnalytics {
namespace Model {

/**
 * <p> Describes the record format and relevant mapping information that should be
 * applied to schematize the records on the stream. </p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/RecordFormat">AWS
 * API Reference</a></p>
 */
class RecordFormat {
 public:
  AWS_KINESISANALYTICS_API RecordFormat() = default;
  AWS_KINESISANALYTICS_API RecordFormat(Aws::Utils::Json::JsonView jsonValue);
  AWS_KINESISANALYTICS_API RecordFormat& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_KINESISANALYTICS_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>The type of record format.</p>
   */
  inline RecordFormatType GetRecordFormatType() const { return m_recordFormatType; }
  inline bool RecordFormatTypeHasBeenSet() const { return m_recordFormatTypeHasBeenSet; }
  inline void SetRecordFormatType(RecordFormatType value) {
    m_recordFormatTypeHasBeenSet = true;
    m_recordFormatType = value;
  }
  inline RecordFormat& WithRecordFormatType(RecordFormatType value) {
    SetRecordFormatType(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>When configuring application input at the time of creating or updating an
   * application, provides additional mapping information specific to the record
   * format (such as JSON, CSV, or record fields delimited by some delimiter) on the
   * streaming source.</p>
   */
  inline const MappingParameters& GetMappingParameters() const { return m_mappingParameters; }
  inline bool MappingParametersHasBeenSet() const { return m_mappingParametersHasBeenSet; }
  template <typename MappingParametersT = MappingParameters>
  void SetMappingParameters(MappingParametersT&& value) {
    m_mappingParametersHasBeenSet = true;
    m_mappingParameters = std::forward<MappingParametersT>(value);
  }
  template <typename MappingParametersT = MappingParameters>
  RecordFormat& WithMappingParameters(MappingParametersT&& value) {
    SetMappingParameters(std::forward<MappingParametersT>(value));
    return *this;
  }
  ///@}
 private:
  RecordFormatType m_recordFormatType{RecordFormatType::NOT_SET};

  MappingParameters m_mappingParameters;
  bool m_recordFormatTypeHasBeenSet = false;
  bool m_mappingParametersHasBeenSet = false;
};

}  // namespace Model
}  // namespace KinesisAnalytics
}  // namespace Aws
