1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Firestore;
19
20class Write extends \Google\Collection
21{
22  protected $collection_key = 'updateTransforms';
23  protected $currentDocumentType = Precondition::class;
24  protected $currentDocumentDataType = '';
25  /**
26   * @var string
27   */
28  public $delete;
29  protected $transformType = DocumentTransform::class;
30  protected $transformDataType = '';
31  protected $updateType = Document::class;
32  protected $updateDataType = '';
33  protected $updateMaskType = DocumentMask::class;
34  protected $updateMaskDataType = '';
35  protected $updateTransformsType = FieldTransform::class;
36  protected $updateTransformsDataType = 'array';
37
38  /**
39   * @param Precondition
40   */
41  public function setCurrentDocument(Precondition $currentDocument)
42  {
43    $this->currentDocument = $currentDocument;
44  }
45  /**
46   * @return Precondition
47   */
48  public function getCurrentDocument()
49  {
50    return $this->currentDocument;
51  }
52  /**
53   * @param string
54   */
55  public function setDelete($delete)
56  {
57    $this->delete = $delete;
58  }
59  /**
60   * @return string
61   */
62  public function getDelete()
63  {
64    return $this->delete;
65  }
66  /**
67   * @param DocumentTransform
68   */
69  public function setTransform(DocumentTransform $transform)
70  {
71    $this->transform = $transform;
72  }
73  /**
74   * @return DocumentTransform
75   */
76  public function getTransform()
77  {
78    return $this->transform;
79  }
80  /**
81   * @param Document
82   */
83  public function setUpdate(Document $update)
84  {
85    $this->update = $update;
86  }
87  /**
88   * @return Document
89   */
90  public function getUpdate()
91  {
92    return $this->update;
93  }
94  /**
95   * @param DocumentMask
96   */
97  public function setUpdateMask(DocumentMask $updateMask)
98  {
99    $this->updateMask = $updateMask;
100  }
101  /**
102   * @return DocumentMask
103   */
104  public function getUpdateMask()
105  {
106    return $this->updateMask;
107  }
108  /**
109   * @param FieldTransform[]
110   */
111  public function setUpdateTransforms($updateTransforms)
112  {
113    $this->updateTransforms = $updateTransforms;
114  }
115  /**
116   * @return FieldTransform[]
117   */
118  public function getUpdateTransforms()
119  {
120    return $this->updateTransforms;
121  }
122}
123
124// Adding a class alias for backwards compatibility with the previous class name.
125class_alias(Write::class, 'Google_Service_Firestore_Write');
126