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

#pragma once
#include <aws/codedeploy/CodeDeploy_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/codedeploy/model/BundleType.h>
#include <utility>

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

  /**
   * <p>Information about the location of application artifacts stored in Amazon
   * S3.</p><p><h3>See Also:</h3>   <a
   * href="http://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/S3Location">AWS
   * API Reference</a></p>
   */
  class S3Location
  {
  public:
    AWS_CODEDEPLOY_API S3Location();
    AWS_CODEDEPLOY_API S3Location(Aws::Utils::Json::JsonView jsonValue);
    AWS_CODEDEPLOY_API S3Location& operator=(Aws::Utils::Json::JsonView jsonValue);
    AWS_CODEDEPLOY_API Aws::Utils::Json::JsonValue Jsonize() const;


    ///@{
    /**
     * <p>The name of the Amazon S3 bucket where the application revision is
     * stored.</p>
     */
    inline const Aws::String& GetBucket() const{ return m_bucket; }
    inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
    inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
    inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
    inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
    inline S3Location& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
    inline S3Location& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
    inline S3Location& WithBucket(const char* value) { SetBucket(value); return *this;}
    ///@}

    ///@{
    /**
     * <p>The name of the Amazon S3 object that represents the bundled artifacts for
     * the application revision.</p>
     */
    inline const Aws::String& GetKey() const{ return m_key; }
    inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
    inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
    inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
    inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
    inline S3Location& WithKey(const Aws::String& value) { SetKey(value); return *this;}
    inline S3Location& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
    inline S3Location& WithKey(const char* value) { SetKey(value); return *this;}
    ///@}

    ///@{
    /**
     * <p>The file type of the application revision. Must be one of the following:</p>
     * <ul> <li> <p> <code>tar</code>: A tar archive file.</p> </li> <li> <p>
     * <code>tgz</code>: A compressed tar archive file.</p> </li> <li> <p>
     * <code>zip</code>: A zip archive file.</p> </li> <li> <p> <code>YAML</code>: A
     * YAML-formatted file.</p> </li> <li> <p> <code>JSON</code>: A JSON-formatted
     * file.</p> </li> </ul>
     */
    inline const BundleType& GetBundleType() const{ return m_bundleType; }
    inline bool BundleTypeHasBeenSet() const { return m_bundleTypeHasBeenSet; }
    inline void SetBundleType(const BundleType& value) { m_bundleTypeHasBeenSet = true; m_bundleType = value; }
    inline void SetBundleType(BundleType&& value) { m_bundleTypeHasBeenSet = true; m_bundleType = std::move(value); }
    inline S3Location& WithBundleType(const BundleType& value) { SetBundleType(value); return *this;}
    inline S3Location& WithBundleType(BundleType&& value) { SetBundleType(std::move(value)); return *this;}
    ///@}

    ///@{
    /**
     * <p>A specific version of the Amazon S3 object that represents the bundled
     * artifacts for the application revision.</p> <p>If the version is not specified,
     * the system uses the most recent version by default.</p>
     */
    inline const Aws::String& GetVersion() const{ return m_version; }
    inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
    inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; }
    inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); }
    inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); }
    inline S3Location& WithVersion(const Aws::String& value) { SetVersion(value); return *this;}
    inline S3Location& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;}
    inline S3Location& WithVersion(const char* value) { SetVersion(value); return *this;}
    ///@}

    ///@{
    /**
     * <p>The ETag of the Amazon S3 object that represents the bundled artifacts for
     * the application revision.</p> <p>If the ETag is not specified as an input
     * parameter, ETag validation of the object is skipped.</p>
     */
    inline const Aws::String& GetETag() const{ return m_eTag; }
    inline bool ETagHasBeenSet() const { return m_eTagHasBeenSet; }
    inline void SetETag(const Aws::String& value) { m_eTagHasBeenSet = true; m_eTag = value; }
    inline void SetETag(Aws::String&& value) { m_eTagHasBeenSet = true; m_eTag = std::move(value); }
    inline void SetETag(const char* value) { m_eTagHasBeenSet = true; m_eTag.assign(value); }
    inline S3Location& WithETag(const Aws::String& value) { SetETag(value); return *this;}
    inline S3Location& WithETag(Aws::String&& value) { SetETag(std::move(value)); return *this;}
    inline S3Location& WithETag(const char* value) { SetETag(value); return *this;}
    ///@}
  private:

    Aws::String m_bucket;
    bool m_bucketHasBeenSet = false;

    Aws::String m_key;
    bool m_keyHasBeenSet = false;

    BundleType m_bundleType;
    bool m_bundleTypeHasBeenSet = false;

    Aws::String m_version;
    bool m_versionHasBeenSet = false;

    Aws::String m_eTag;
    bool m_eTagHasBeenSet = false;
  };

} // namespace Model
} // namespace CodeDeploy
} // namespace Aws
