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-crt/S3Crt_EXPORTS.h> 8 9 namespace Aws 10 { 11 namespace Utils 12 { 13 namespace Xml 14 { 15 class XmlNode; 16 } // namespace Xml 17 } // namespace Utils 18 namespace S3Crt 19 { 20 namespace Model 21 { 22 23 /** 24 * <p>Specifies the byte range of the object to get the records from. A record is 25 * processed when its first byte is contained by the range. This parameter is 26 * optional, but when specified, it must not be empty. See RFC 2616, Section 27 * 14.35.1 about how to specify the start and end of the range.</p><p><h3>See 28 * Also:</h3> <a 29 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ScanRange">AWS API 30 * Reference</a></p> 31 */ 32 class AWS_S3CRT_API ScanRange 33 { 34 public: 35 ScanRange(); 36 ScanRange(const Aws::Utils::Xml::XmlNode& xmlNode); 37 ScanRange& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 38 39 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; 40 41 42 /** 43 * <p>Specifies the start of the byte range. This parameter is optional. Valid 44 * values: non-negative integers. The default value is 0. If only start is 45 * supplied, it means scan from that point to the end of the file.For example; 46 * <code><scanrange><start>50</start></scanrange></code> 47 * means scan from byte 50 until the end of the file.</p> 48 */ GetStart()49 inline long long GetStart() const{ return m_start; } 50 51 /** 52 * <p>Specifies the start of the byte range. This parameter is optional. Valid 53 * values: non-negative integers. The default value is 0. If only start is 54 * supplied, it means scan from that point to the end of the file.For example; 55 * <code><scanrange><start>50</start></scanrange></code> 56 * means scan from byte 50 until the end of the file.</p> 57 */ StartHasBeenSet()58 inline bool StartHasBeenSet() const { return m_startHasBeenSet; } 59 60 /** 61 * <p>Specifies the start of the byte range. This parameter is optional. Valid 62 * values: non-negative integers. The default value is 0. If only start is 63 * supplied, it means scan from that point to the end of the file.For example; 64 * <code><scanrange><start>50</start></scanrange></code> 65 * means scan from byte 50 until the end of the file.</p> 66 */ SetStart(long long value)67 inline void SetStart(long long value) { m_startHasBeenSet = true; m_start = value; } 68 69 /** 70 * <p>Specifies the start of the byte range. This parameter is optional. Valid 71 * values: non-negative integers. The default value is 0. If only start is 72 * supplied, it means scan from that point to the end of the file.For example; 73 * <code><scanrange><start>50</start></scanrange></code> 74 * means scan from byte 50 until the end of the file.</p> 75 */ WithStart(long long value)76 inline ScanRange& WithStart(long long value) { SetStart(value); return *this;} 77 78 79 /** 80 * <p>Specifies the end of the byte range. This parameter is optional. Valid 81 * values: non-negative integers. The default value is one less than the size of 82 * the object being queried. If only the End parameter is supplied, it is 83 * interpreted to mean scan the last N bytes of the file. For example, 84 * <code><scanrange><end>50</end></scanrange></code> means 85 * scan the last 50 bytes.</p> 86 */ GetEnd()87 inline long long GetEnd() const{ return m_end; } 88 89 /** 90 * <p>Specifies the end of the byte range. This parameter is optional. Valid 91 * values: non-negative integers. The default value is one less than the size of 92 * the object being queried. If only the End parameter is supplied, it is 93 * interpreted to mean scan the last N bytes of the file. For example, 94 * <code><scanrange><end>50</end></scanrange></code> means 95 * scan the last 50 bytes.</p> 96 */ EndHasBeenSet()97 inline bool EndHasBeenSet() const { return m_endHasBeenSet; } 98 99 /** 100 * <p>Specifies the end of the byte range. This parameter is optional. Valid 101 * values: non-negative integers. The default value is one less than the size of 102 * the object being queried. If only the End parameter is supplied, it is 103 * interpreted to mean scan the last N bytes of the file. For example, 104 * <code><scanrange><end>50</end></scanrange></code> means 105 * scan the last 50 bytes.</p> 106 */ SetEnd(long long value)107 inline void SetEnd(long long value) { m_endHasBeenSet = true; m_end = value; } 108 109 /** 110 * <p>Specifies the end of the byte range. This parameter is optional. Valid 111 * values: non-negative integers. The default value is one less than the size of 112 * the object being queried. If only the End parameter is supplied, it is 113 * interpreted to mean scan the last N bytes of the file. For example, 114 * <code><scanrange><end>50</end></scanrange></code> means 115 * scan the last 50 bytes.</p> 116 */ WithEnd(long long value)117 inline ScanRange& WithEnd(long long value) { SetEnd(value); return *this;} 118 119 private: 120 121 long long m_start; 122 bool m_startHasBeenSet; 123 124 long long m_end; 125 bool m_endHasBeenSet; 126 }; 127 128 } // namespace Model 129 } // namespace S3Crt 130 } // namespace Aws 131