GoogleCloudMlV1StudyConfigMetricSpec.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 GoogleCloudMlV1StudyConfigMetricSpec extends \Google\Model
  19. {
  20. /**
  21. * Goal Type will default to maximize.
  22. */
  23. public const GOAL_GOAL_TYPE_UNSPECIFIED = 'GOAL_TYPE_UNSPECIFIED';
  24. /**
  25. * Maximize the goal metric.
  26. */
  27. public const GOAL_MAXIMIZE = 'MAXIMIZE';
  28. /**
  29. * Minimize the goal metric.
  30. */
  31. public const GOAL_MINIMIZE = 'MINIMIZE';
  32. /**
  33. * Required. The optimization goal of the metric.
  34. *
  35. * @var string
  36. */
  37. public $goal;
  38. /**
  39. * Required. The name of the metric.
  40. *
  41. * @var string
  42. */
  43. public $metric;
  44. /**
  45. * Required. The optimization goal of the metric.
  46. *
  47. * Accepted values: GOAL_TYPE_UNSPECIFIED, MAXIMIZE, MINIMIZE
  48. *
  49. * @param self::GOAL_* $goal
  50. */
  51. public function setGoal($goal)
  52. {
  53. $this->goal = $goal;
  54. }
  55. /**
  56. * @return self::GOAL_*
  57. */
  58. public function getGoal()
  59. {
  60. return $this->goal;
  61. }
  62. /**
  63. * Required. The name of the metric.
  64. *
  65. * @param string $metric
  66. */
  67. public function setMetric($metric)
  68. {
  69. $this->metric = $metric;
  70. }
  71. /**
  72. * @return string
  73. */
  74. public function getMetric()
  75. {
  76. return $this->metric;
  77. }
  78. }
  79. // Adding a class alias for backwards compatibility with the previous class name.
  80. class_alias(GoogleCloudMlV1StudyConfigMetricSpec::class, 'Google_Service_CloudMachineLearningEngine_GoogleCloudMlV1StudyConfigMetricSpec');