olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
StartBatchRequest.h
1/*
2 * Copyright (C) 2019-2023 HERE Europe B.V.
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 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 * License-Filename: LICENSE
18 */
19
20#pragma once
21
22#include <string>
23#include <utility>
24#include <vector>
25
26#include <olp/core/porting/optional.h>
27#include <olp/dataservice/write/DataServiceWriteApi.h>
28#include <olp/dataservice/write/generated/model/VersionDependency.h>
29
30namespace olp {
31namespace dataservice {
32namespace write {
33namespace model {
34
36class DATASERVICE_WRITE_API StartBatchRequest {
37 public:
38 StartBatchRequest() = default;
39 StartBatchRequest(const StartBatchRequest&) = default;
41 StartBatchRequest& operator=(const StartBatchRequest&) = default;
42 StartBatchRequest& operator=(StartBatchRequest&&) = default;
43 virtual ~StartBatchRequest() = default;
44
50 StartBatchRequest& WithLayers(std::vector<std::string> layers) {
51 layers_ = std::move(layers);
52 return *this;
53 }
54
60 const porting::optional<std::vector<std::string>>& GetLayers() const {
61 return layers_;
62 }
63
70 std::vector<VersionDependency> versionDependencies) {
71 versionDependencies_ = std::move(versionDependencies);
72 return *this;
73 }
74
80 const porting::optional<std::vector<VersionDependency>>&
82 return versionDependencies_;
83 }
84
95 const porting::optional<std::string>& GetBillingTag() const {
96 return billing_tag_;
97 }
98
106 StartBatchRequest& WithBillingTag(std::string billing_tag) {
107 billing_tag_ = std::move(billing_tag);
108 return *this;
109 }
110
111 private:
112 porting::optional<std::vector<std::string>> layers_;
113 porting::optional<std::vector<VersionDependency>> versionDependencies_;
114 porting::optional<std::string> billing_tag_;
115};
116
117} // namespace model
118} // namespace write
119} // namespace dataservice
120} // namespace olp
Starts a versioned batch operation.
Definition StartBatchRequest.h:36
StartBatchRequest & WithVersionDependencies(std::vector< VersionDependency > versionDependencies)
Sets the version dependencies used in the batch operation.
Definition StartBatchRequest.h:69
const porting::optional< std::string > & GetBillingTag() const
Gets the billing tag to group billing records together.
Definition StartBatchRequest.h:95
StartBatchRequest & WithLayers(std::vector< std::string > layers)
Sets the layers used in the batch operation.
Definition StartBatchRequest.h:50
const porting::optional< std::vector< VersionDependency > > & GetVersionDependencies() const
Gets the version dependencies used in the batch operation.
Definition StartBatchRequest.h:81
const porting::optional< std::vector< std::string > > & GetLayers() const
Gets the layers used in the batch operation.
Definition StartBatchRequest.h:60
StartBatchRequest & WithBillingTag(std::string billing_tag)
Sets the billing tag for the request.
Definition StartBatchRequest.h:106
Rules all the other namespaces.
Definition AppleSignInProperties.h:24