1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/awstransfer/model/InputFileLocation.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8 
9 #include <utility>
10 
11 using namespace Aws::Utils::Json;
12 using namespace Aws::Utils;
13 
14 namespace Aws
15 {
16 namespace Transfer
17 {
18 namespace Model
19 {
20 
InputFileLocation()21 InputFileLocation::InputFileLocation() :
22     m_s3FileLocationHasBeenSet(false),
23     m_efsFileLocationHasBeenSet(false)
24 {
25 }
26 
InputFileLocation(JsonView jsonValue)27 InputFileLocation::InputFileLocation(JsonView jsonValue) :
28     m_s3FileLocationHasBeenSet(false),
29     m_efsFileLocationHasBeenSet(false)
30 {
31   *this = jsonValue;
32 }
33 
operator =(JsonView jsonValue)34 InputFileLocation& InputFileLocation::operator =(JsonView jsonValue)
35 {
36   if(jsonValue.ValueExists("S3FileLocation"))
37   {
38     m_s3FileLocation = jsonValue.GetObject("S3FileLocation");
39 
40     m_s3FileLocationHasBeenSet = true;
41   }
42 
43   if(jsonValue.ValueExists("EfsFileLocation"))
44   {
45     m_efsFileLocation = jsonValue.GetObject("EfsFileLocation");
46 
47     m_efsFileLocationHasBeenSet = true;
48   }
49 
50   return *this;
51 }
52 
Jsonize() const53 JsonValue InputFileLocation::Jsonize() const
54 {
55   JsonValue payload;
56 
57   if(m_s3FileLocationHasBeenSet)
58   {
59    payload.WithObject("S3FileLocation", m_s3FileLocation.Jsonize());
60 
61   }
62 
63   if(m_efsFileLocationHasBeenSet)
64   {
65    payload.WithObject("EfsFileLocation", m_efsFileLocation.Jsonize());
66 
67   }
68 
69   return payload;
70 }
71 
72 } // namespace Model
73 } // namespace Transfer
74 } // namespace Aws
75