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/ec2/EC2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 
10 namespace Aws
11 {
12 namespace Utils
13 {
14 namespace Xml
15 {
16   class XmlNode;
17 } // namespace Xml
18 } // namespace Utils
19 namespace EC2
20 {
21 namespace Model
22 {
23 
24   /**
25    * <p>The CPU options for the instance. Both the core count and threads per core
26    * must be specified in the request.</p><p><h3>See Also:</h3>   <a
27    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateCpuOptionsRequest">AWS
28    * API Reference</a></p>
29    */
30   class AWS_EC2_API LaunchTemplateCpuOptionsRequest
31   {
32   public:
33     LaunchTemplateCpuOptionsRequest();
34     LaunchTemplateCpuOptionsRequest(const Aws::Utils::Xml::XmlNode& xmlNode);
35     LaunchTemplateCpuOptionsRequest& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
36 
37     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
38     void OutputToStream(Aws::OStream& oStream, const char* location) const;
39 
40 
41     /**
42      * <p>The number of CPU cores for the instance.</p>
43      */
GetCoreCount()44     inline int GetCoreCount() const{ return m_coreCount; }
45 
46     /**
47      * <p>The number of CPU cores for the instance.</p>
48      */
CoreCountHasBeenSet()49     inline bool CoreCountHasBeenSet() const { return m_coreCountHasBeenSet; }
50 
51     /**
52      * <p>The number of CPU cores for the instance.</p>
53      */
SetCoreCount(int value)54     inline void SetCoreCount(int value) { m_coreCountHasBeenSet = true; m_coreCount = value; }
55 
56     /**
57      * <p>The number of CPU cores for the instance.</p>
58      */
WithCoreCount(int value)59     inline LaunchTemplateCpuOptionsRequest& WithCoreCount(int value) { SetCoreCount(value); return *this;}
60 
61 
62     /**
63      * <p>The number of threads per CPU core. To disable multithreading for the
64      * instance, specify a value of 1. Otherwise, specify the default value of 2.</p>
65      */
GetThreadsPerCore()66     inline int GetThreadsPerCore() const{ return m_threadsPerCore; }
67 
68     /**
69      * <p>The number of threads per CPU core. To disable multithreading for the
70      * instance, specify a value of 1. Otherwise, specify the default value of 2.</p>
71      */
ThreadsPerCoreHasBeenSet()72     inline bool ThreadsPerCoreHasBeenSet() const { return m_threadsPerCoreHasBeenSet; }
73 
74     /**
75      * <p>The number of threads per CPU core. To disable multithreading for the
76      * instance, specify a value of 1. Otherwise, specify the default value of 2.</p>
77      */
SetThreadsPerCore(int value)78     inline void SetThreadsPerCore(int value) { m_threadsPerCoreHasBeenSet = true; m_threadsPerCore = value; }
79 
80     /**
81      * <p>The number of threads per CPU core. To disable multithreading for the
82      * instance, specify a value of 1. Otherwise, specify the default value of 2.</p>
83      */
WithThreadsPerCore(int value)84     inline LaunchTemplateCpuOptionsRequest& WithThreadsPerCore(int value) { SetThreadsPerCore(value); return *this;}
85 
86   private:
87 
88     int m_coreCount;
89     bool m_coreCountHasBeenSet;
90 
91     int m_threadsPerCore;
92     bool m_threadsPerCoreHasBeenSet;
93   };
94 
95 } // namespace Model
96 } // namespace EC2
97 } // namespace Aws
98