1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/s3/S3_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Xml
16 {
17   class XmlNode;
18 } // namespace Xml
19 } // namespace Utils
20 namespace S3
21 {
22 namespace Model
23 {
24 
25   /**
26    * <p>Object Identifier is unique value to identify objects.</p><p><h3>See
27    * Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectIdentifier">AWS
29    * API Reference</a></p>
30    */
31   class AWS_S3_API ObjectIdentifier
32   {
33   public:
34     ObjectIdentifier();
35     ObjectIdentifier(const Aws::Utils::Xml::XmlNode& xmlNode);
36     ObjectIdentifier& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37 
38     void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
39 
40 
41     /**
42      * <p>Key name of the object.</p>  <p>Replacement must be made for
43      * object keys containing special characters (such as carriage returns) when using
44      * XML requests. For more information, see <a
45      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
46      * XML related object key constraints</a>.</p>
47      */
GetKey()48     inline const Aws::String& GetKey() const{ return m_key; }
49 
50     /**
51      * <p>Key name of the object.</p>  <p>Replacement must be made for
52      * object keys containing special characters (such as carriage returns) when using
53      * XML requests. For more information, see <a
54      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
55      * XML related object key constraints</a>.</p>
56      */
KeyHasBeenSet()57     inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
58 
59     /**
60      * <p>Key name of the object.</p>  <p>Replacement must be made for
61      * object keys containing special characters (such as carriage returns) when using
62      * XML requests. For more information, see <a
63      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
64      * XML related object key constraints</a>.</p>
65      */
SetKey(const Aws::String & value)66     inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
67 
68     /**
69      * <p>Key name of the object.</p>  <p>Replacement must be made for
70      * object keys containing special characters (such as carriage returns) when using
71      * XML requests. For more information, see <a
72      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
73      * XML related object key constraints</a>.</p>
74      */
SetKey(Aws::String && value)75     inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
76 
77     /**
78      * <p>Key name of the object.</p>  <p>Replacement must be made for
79      * object keys containing special characters (such as carriage returns) when using
80      * XML requests. For more information, see <a
81      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
82      * XML related object key constraints</a>.</p>
83      */
SetKey(const char * value)84     inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
85 
86     /**
87      * <p>Key name of the object.</p>  <p>Replacement must be made for
88      * object keys containing special characters (such as carriage returns) when using
89      * XML requests. For more information, see <a
90      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
91      * XML related object key constraints</a>.</p>
92      */
WithKey(const Aws::String & value)93     inline ObjectIdentifier& WithKey(const Aws::String& value) { SetKey(value); return *this;}
94 
95     /**
96      * <p>Key name of the object.</p>  <p>Replacement must be made for
97      * object keys containing special characters (such as carriage returns) when using
98      * XML requests. For more information, see <a
99      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
100      * XML related object key constraints</a>.</p>
101      */
WithKey(Aws::String && value)102     inline ObjectIdentifier& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
103 
104     /**
105      * <p>Key name of the object.</p>  <p>Replacement must be made for
106      * object keys containing special characters (such as carriage returns) when using
107      * XML requests. For more information, see <a
108      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
109      * XML related object key constraints</a>.</p>
110      */
WithKey(const char * value)111     inline ObjectIdentifier& WithKey(const char* value) { SetKey(value); return *this;}
112 
113 
114     /**
115      * <p>VersionId for the specific version of the object to delete.</p>
116      */
GetVersionId()117     inline const Aws::String& GetVersionId() const{ return m_versionId; }
118 
119     /**
120      * <p>VersionId for the specific version of the object to delete.</p>
121      */
VersionIdHasBeenSet()122     inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
123 
124     /**
125      * <p>VersionId for the specific version of the object to delete.</p>
126      */
SetVersionId(const Aws::String & value)127     inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
128 
129     /**
130      * <p>VersionId for the specific version of the object to delete.</p>
131      */
SetVersionId(Aws::String && value)132     inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
133 
134     /**
135      * <p>VersionId for the specific version of the object to delete.</p>
136      */
SetVersionId(const char * value)137     inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
138 
139     /**
140      * <p>VersionId for the specific version of the object to delete.</p>
141      */
WithVersionId(const Aws::String & value)142     inline ObjectIdentifier& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
143 
144     /**
145      * <p>VersionId for the specific version of the object to delete.</p>
146      */
WithVersionId(Aws::String && value)147     inline ObjectIdentifier& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
148 
149     /**
150      * <p>VersionId for the specific version of the object to delete.</p>
151      */
WithVersionId(const char * value)152     inline ObjectIdentifier& WithVersionId(const char* value) { SetVersionId(value); return *this;}
153 
154   private:
155 
156     Aws::String m_key;
157     bool m_keyHasBeenSet;
158 
159     Aws::String m_versionId;
160     bool m_versionIdHasBeenSet;
161   };
162 
163 } // namespace Model
164 } // namespace S3
165 } // namespace Aws
166