GoogleIamV1SetIamPolicyRequest.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. namespace Google\Service\CloudMachineLearningEngine;
  18. class GoogleIamV1SetIamPolicyRequest extends \Google\Model
  19. {
  20. protected $policyType = GoogleIamV1Policy::class;
  21. protected $policyDataType = '';
  22. /**
  23. * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
  24. * the fields in the mask will be modified. If no mask is provided, the
  25. * following default mask is used: `paths: "bindings, etag"`
  26. *
  27. * @var string
  28. */
  29. public $updateMask;
  30. /**
  31. * REQUIRED: The complete policy to be applied to the `resource`. The size of
  32. * the policy is limited to a few 10s of KB. An empty policy is a valid policy
  33. * but certain Google Cloud services (such as Projects) might reject them.
  34. *
  35. * @param GoogleIamV1Policy $policy
  36. */
  37. public function setPolicy(GoogleIamV1Policy $policy)
  38. {
  39. $this->policy = $policy;
  40. }
  41. /**
  42. * @return GoogleIamV1Policy
  43. */
  44. public function getPolicy()
  45. {
  46. return $this->policy;
  47. }
  48. /**
  49. * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
  50. * the fields in the mask will be modified. If no mask is provided, the
  51. * following default mask is used: `paths: "bindings, etag"`
  52. *
  53. * @param string $updateMask
  54. */
  55. public function setUpdateMask($updateMask)
  56. {
  57. $this->updateMask = $updateMask;
  58. }
  59. /**
  60. * @return string
  61. */
  62. public function getUpdateMask()
  63. {
  64. return $this->updateMask;
  65. }
  66. }
  67. // Adding a class alias for backwards compatibility with the previous class name.
  68. class_alias(GoogleIamV1SetIamPolicyRequest::class, 'Google_Service_CloudMachineLearningEngine_GoogleIamV1SetIamPolicyRequest');