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/logs/CloudWatchLogs_EXPORTS.h>
8 #include <aws/logs/CloudWatchLogsRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace CloudWatchLogs
15 {
16 namespace Model
17 {
18 
19   /**
20    */
21   class AWS_CLOUDWATCHLOGS_API PutRetentionPolicyRequest : public CloudWatchLogsRequest
22   {
23   public:
24     PutRetentionPolicyRequest();
25 
26     // Service request name is the Operation name which will send this request out,
27     // each operation should has unique request name, so that we can get operation's name from this request.
28     // Note: this is not true for response, multiple operations may have the same response name,
29     // so we can not get operation's name from response.
GetServiceRequestName()30     inline virtual const char* GetServiceRequestName() const override { return "PutRetentionPolicy"; }
31 
32     Aws::String SerializePayload() const override;
33 
34     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
35 
36 
37     /**
38      * <p>The name of the log group.</p>
39      */
GetLogGroupName()40     inline const Aws::String& GetLogGroupName() const{ return m_logGroupName; }
41 
42     /**
43      * <p>The name of the log group.</p>
44      */
LogGroupNameHasBeenSet()45     inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
46 
47     /**
48      * <p>The name of the log group.</p>
49      */
SetLogGroupName(const Aws::String & value)50     inline void SetLogGroupName(const Aws::String& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = value; }
51 
52     /**
53      * <p>The name of the log group.</p>
54      */
SetLogGroupName(Aws::String && value)55     inline void SetLogGroupName(Aws::String&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = std::move(value); }
56 
57     /**
58      * <p>The name of the log group.</p>
59      */
SetLogGroupName(const char * value)60     inline void SetLogGroupName(const char* value) { m_logGroupNameHasBeenSet = true; m_logGroupName.assign(value); }
61 
62     /**
63      * <p>The name of the log group.</p>
64      */
WithLogGroupName(const Aws::String & value)65     inline PutRetentionPolicyRequest& WithLogGroupName(const Aws::String& value) { SetLogGroupName(value); return *this;}
66 
67     /**
68      * <p>The name of the log group.</p>
69      */
WithLogGroupName(Aws::String && value)70     inline PutRetentionPolicyRequest& WithLogGroupName(Aws::String&& value) { SetLogGroupName(std::move(value)); return *this;}
71 
72     /**
73      * <p>The name of the log group.</p>
74      */
WithLogGroupName(const char * value)75     inline PutRetentionPolicyRequest& WithLogGroupName(const char* value) { SetLogGroupName(value); return *this;}
76 
77 
78 
GetRetentionInDays()79     inline int GetRetentionInDays() const{ return m_retentionInDays; }
80 
81 
RetentionInDaysHasBeenSet()82     inline bool RetentionInDaysHasBeenSet() const { return m_retentionInDaysHasBeenSet; }
83 
84 
SetRetentionInDays(int value)85     inline void SetRetentionInDays(int value) { m_retentionInDaysHasBeenSet = true; m_retentionInDays = value; }
86 
87 
WithRetentionInDays(int value)88     inline PutRetentionPolicyRequest& WithRetentionInDays(int value) { SetRetentionInDays(value); return *this;}
89 
90   private:
91 
92     Aws::String m_logGroupName;
93     bool m_logGroupNameHasBeenSet;
94 
95     int m_retentionInDays;
96     bool m_retentionInDaysHasBeenSet;
97   };
98 
99 } // namespace Model
100 } // namespace CloudWatchLogs
101 } // namespace Aws
102