Skip to content

Commit a0bc67a

Browse files
jsondaicopybara-github
authored andcommitted
chore: GenAI Client(evals) - add get/list EvaluationExperiment
PiperOrigin-RevId: 933340869
1 parent 567e542 commit a0bc67a

1 file changed

Lines changed: 120 additions & 0 deletions

File tree

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
/*
2+
* Copyright 2025 Google LLC
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+
* https://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+
17+
// Auto-generated code. Do not edit.
18+
19+
package com.google.cloud.agentplatform.types;
20+
21+
import com.fasterxml.jackson.annotation.JsonCreator;
22+
import com.fasterxml.jackson.annotation.JsonValue;
23+
import com.google.common.base.Ascii;
24+
import java.util.Objects;
25+
26+
/** Merge strategy for the evaluation experiment. */
27+
public class EvaluationExperimentMergeStrategy {
28+
29+
/** Enum representing the known values for EvaluationExperimentMergeStrategy. */
30+
public enum Known {
31+
/** Unspecified merge strategy. */
32+
MERGE_STRATEGY_UNSPECIFIED,
33+
34+
/** Default. Runs are treated as an independent, sequential history. */
35+
SEQUENTIAL_HISTORY,
36+
37+
/** Runs are parallel iterations contributing to a shared result set. */
38+
SHARED_RESULT_SET,
39+
40+
EVALUATION_EXPERIMENT_MERGE_STRATEGY_UNSPECIFIED
41+
}
42+
43+
private Known evaluationExperimentMergeStrategyEnum;
44+
private final String value;
45+
46+
@JsonCreator
47+
public EvaluationExperimentMergeStrategy(String value) {
48+
this.value = value;
49+
for (Known evaluationExperimentMergeStrategyEnum : Known.values()) {
50+
if (Ascii.equalsIgnoreCase(evaluationExperimentMergeStrategyEnum.toString(), value)) {
51+
this.evaluationExperimentMergeStrategyEnum = evaluationExperimentMergeStrategyEnum;
52+
break;
53+
}
54+
}
55+
if (this.evaluationExperimentMergeStrategyEnum == null) {
56+
this.evaluationExperimentMergeStrategyEnum =
57+
Known.EVALUATION_EXPERIMENT_MERGE_STRATEGY_UNSPECIFIED;
58+
}
59+
}
60+
61+
public EvaluationExperimentMergeStrategy(Known knownValue) {
62+
this.evaluationExperimentMergeStrategyEnum = knownValue;
63+
this.value = knownValue.toString();
64+
}
65+
66+
@ExcludeFromGeneratedCoverageReport
67+
@Override
68+
@JsonValue
69+
public String toString() {
70+
return this.value;
71+
}
72+
73+
@ExcludeFromGeneratedCoverageReport
74+
@SuppressWarnings("PatternMatchingInstanceof")
75+
@Override
76+
public boolean equals(Object o) {
77+
if (this == o) {
78+
return true;
79+
}
80+
if (o == null) {
81+
return false;
82+
}
83+
84+
if (!(o instanceof EvaluationExperimentMergeStrategy)) {
85+
return false;
86+
}
87+
88+
EvaluationExperimentMergeStrategy other = (EvaluationExperimentMergeStrategy) o;
89+
90+
if (this.evaluationExperimentMergeStrategyEnum
91+
!= Known.EVALUATION_EXPERIMENT_MERGE_STRATEGY_UNSPECIFIED
92+
&& other.evaluationExperimentMergeStrategyEnum
93+
!= Known.EVALUATION_EXPERIMENT_MERGE_STRATEGY_UNSPECIFIED) {
94+
return this.evaluationExperimentMergeStrategyEnum
95+
== other.evaluationExperimentMergeStrategyEnum;
96+
} else if (this.evaluationExperimentMergeStrategyEnum
97+
== Known.EVALUATION_EXPERIMENT_MERGE_STRATEGY_UNSPECIFIED
98+
&& other.evaluationExperimentMergeStrategyEnum
99+
== Known.EVALUATION_EXPERIMENT_MERGE_STRATEGY_UNSPECIFIED) {
100+
return this.value.equals(other.value);
101+
}
102+
return false;
103+
}
104+
105+
@ExcludeFromGeneratedCoverageReport
106+
@Override
107+
public int hashCode() {
108+
if (this.evaluationExperimentMergeStrategyEnum
109+
!= Known.EVALUATION_EXPERIMENT_MERGE_STRATEGY_UNSPECIFIED) {
110+
return this.evaluationExperimentMergeStrategyEnum.hashCode();
111+
} else {
112+
return Objects.hashCode(this.value);
113+
}
114+
}
115+
116+
@ExcludeFromGeneratedCoverageReport
117+
public Known knownEnum() {
118+
return this.evaluationExperimentMergeStrategyEnum;
119+
}
120+
}

0 commit comments

Comments
 (0)