AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
DavsRequest.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKASSETSINTERFACES_DAVSREQUEST_H_
17 #define ACSDKASSETSINTERFACES_DAVSREQUEST_H_
18 
19 #include <map>
20 #include <set>
21 
22 #include "ArtifactRequest.h"
23 #include "Region.h"
24 
25 namespace alexaClientSDK {
26 namespace acsdkAssets {
27 namespace commonInterfaces {
28 
29 class DavsRequest : public ArtifactRequest {
30 public:
31  using FilterMap = std::map<std::string, std::set<std::string>>;
32 
45  static std::shared_ptr<DavsRequest> create(
48  FilterMap filters,
49  Region endpoint = Region::NA,
50  bool unpack = false);
51 
55  const std::string& getType() const;
56 
60  const std::string& getKey() const;
61 
65  const FilterMap& getFilters() const;
66 
70  Region getRegion() const;
71 
74  Type getRequestType() const override;
75  bool needsUnpacking() const override;
76  std::string getSummary() const override;
77  std::string toJsonString() const override;
79 
80 private:
81  DavsRequest(std::string type, std::string key, FilterMap filters, Region endpoint, bool unpack);
82 
83 private:
84  const std::string m_type;
85  const std::string m_key;
86  const FilterMap m_filters;
87  const Region m_region;
88  const bool m_unpack;
89  std::string m_summary;
90 };
91 
92 inline const std::string& DavsRequest::getType() const {
93  return m_type;
94 }
95 
96 inline const std::string& DavsRequest::getKey() const {
97  return m_key;
98 }
99 
101  return m_filters;
102 }
103 
105  return m_region;
106 }
107 
109  return Type::DAVS;
110 }
111 
112 inline bool DavsRequest::needsUnpacking() const {
113  return m_unpack;
114 }
115 
117  return m_summary;
118 }
119 
120 } // namespace commonInterfaces
121 } // namespace acsdkAssets
122 } // namespace alexaClientSDK
123 
124 #endif // ACSDKASSETSINTERFACES_DAVSREQUEST_H_
bool needsUnpacking() const override
Definition: DavsRequest.h:112
Region getRegion() const
Definition: DavsRequest.h:104
::std::string string
Definition: gtest-port.h:1097
const std::string & getType() const
Definition: DavsRequest.h:92
std::string getSummary() const override
Definition: DavsRequest.h:116
const FilterMap & getFilters() const
Definition: DavsRequest.h:100
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
static std::shared_ptr< DavsRequest > create(std::string type, std::string key, FilterMap filters, Region endpoint=Region::NA, bool unpack=false)
type
Definition: upload.py:443
std::map< std::string, std::set< std::string > > FilterMap
Definition: DavsRequest.h:31
const std::string & getKey() const
Definition: DavsRequest.h:96
static const std::string key
The database key to be used by the protocol given the METADATA object.
Definition: SharedAVSSettingProtocolTest.cpp:58
Type getRequestType() const override
Definition: DavsRequest.h:108

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0