• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 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 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/orgpolicy/v2/orgpolicy.proto
18 
19 package com.google.cloud.orgpolicy.v2;
20 
21 public interface PolicySpecOrBuilder
22     extends
23     // @@protoc_insertion_point(interface_extends:google.cloud.orgpolicy.v2.PolicySpec)
24     com.google.protobuf.MessageOrBuilder {
25 
26   /**
27    *
28    *
29    * <pre>
30    * An opaque tag indicating the current version of the `Policy`, used for
31    * concurrency control.
32    * This field is ignored if used in a `CreatePolicy` request.
33    * When the `Policy` is returned from either a `GetPolicy` or a
34    * `ListPolicies` request, this `etag` indicates the version of the
35    * current `Policy` to use when executing a read-modify-write loop.
36    * When the `Policy` is returned from a `GetEffectivePolicy` request, the
37    * `etag` will be unset.
38    * </pre>
39    *
40    * <code>string etag = 1;</code>
41    *
42    * @return The etag.
43    */
getEtag()44   java.lang.String getEtag();
45   /**
46    *
47    *
48    * <pre>
49    * An opaque tag indicating the current version of the `Policy`, used for
50    * concurrency control.
51    * This field is ignored if used in a `CreatePolicy` request.
52    * When the `Policy` is returned from either a `GetPolicy` or a
53    * `ListPolicies` request, this `etag` indicates the version of the
54    * current `Policy` to use when executing a read-modify-write loop.
55    * When the `Policy` is returned from a `GetEffectivePolicy` request, the
56    * `etag` will be unset.
57    * </pre>
58    *
59    * <code>string etag = 1;</code>
60    *
61    * @return The bytes for etag.
62    */
getEtagBytes()63   com.google.protobuf.ByteString getEtagBytes();
64 
65   /**
66    *
67    *
68    * <pre>
69    * Output only. The time stamp this was previously updated. This
70    * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was
71    * made for that `Policy`.
72    * </pre>
73    *
74    * <code>.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
75    * </code>
76    *
77    * @return Whether the updateTime field is set.
78    */
hasUpdateTime()79   boolean hasUpdateTime();
80   /**
81    *
82    *
83    * <pre>
84    * Output only. The time stamp this was previously updated. This
85    * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was
86    * made for that `Policy`.
87    * </pre>
88    *
89    * <code>.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
90    * </code>
91    *
92    * @return The updateTime.
93    */
getUpdateTime()94   com.google.protobuf.Timestamp getUpdateTime();
95   /**
96    *
97    *
98    * <pre>
99    * Output only. The time stamp this was previously updated. This
100    * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was
101    * made for that `Policy`.
102    * </pre>
103    *
104    * <code>.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
105    * </code>
106    */
getUpdateTimeOrBuilder()107   com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder();
108 
109   /**
110    *
111    *
112    * <pre>
113    * Up to 10 PolicyRules are allowed.
114    * In Policies for boolean constraints, the following requirements apply:
115    *   - There must be one and only one PolicyRule where condition is unset.
116    *   - BooleanPolicyRules with conditions must set `enforced` to the opposite
117    *     of the PolicyRule without a condition.
118    *   - During policy evaluation, PolicyRules with conditions that are
119    *     true for a target resource take precedence.
120    * </pre>
121    *
122    * <code>repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;</code>
123    */
getRulesList()124   java.util.List<com.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule> getRulesList();
125   /**
126    *
127    *
128    * <pre>
129    * Up to 10 PolicyRules are allowed.
130    * In Policies for boolean constraints, the following requirements apply:
131    *   - There must be one and only one PolicyRule where condition is unset.
132    *   - BooleanPolicyRules with conditions must set `enforced` to the opposite
133    *     of the PolicyRule without a condition.
134    *   - During policy evaluation, PolicyRules with conditions that are
135    *     true for a target resource take precedence.
136    * </pre>
137    *
138    * <code>repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;</code>
139    */
getRules(int index)140   com.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule getRules(int index);
141   /**
142    *
143    *
144    * <pre>
145    * Up to 10 PolicyRules are allowed.
146    * In Policies for boolean constraints, the following requirements apply:
147    *   - There must be one and only one PolicyRule where condition is unset.
148    *   - BooleanPolicyRules with conditions must set `enforced` to the opposite
149    *     of the PolicyRule without a condition.
150    *   - During policy evaluation, PolicyRules with conditions that are
151    *     true for a target resource take precedence.
152    * </pre>
153    *
154    * <code>repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;</code>
155    */
getRulesCount()156   int getRulesCount();
157   /**
158    *
159    *
160    * <pre>
161    * Up to 10 PolicyRules are allowed.
162    * In Policies for boolean constraints, the following requirements apply:
163    *   - There must be one and only one PolicyRule where condition is unset.
164    *   - BooleanPolicyRules with conditions must set `enforced` to the opposite
165    *     of the PolicyRule without a condition.
166    *   - During policy evaluation, PolicyRules with conditions that are
167    *     true for a target resource take precedence.
168    * </pre>
169    *
170    * <code>repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;</code>
171    */
172   java.util.List<? extends com.google.cloud.orgpolicy.v2.PolicySpec.PolicyRuleOrBuilder>
getRulesOrBuilderList()173       getRulesOrBuilderList();
174   /**
175    *
176    *
177    * <pre>
178    * Up to 10 PolicyRules are allowed.
179    * In Policies for boolean constraints, the following requirements apply:
180    *   - There must be one and only one PolicyRule where condition is unset.
181    *   - BooleanPolicyRules with conditions must set `enforced` to the opposite
182    *     of the PolicyRule without a condition.
183    *   - During policy evaluation, PolicyRules with conditions that are
184    *     true for a target resource take precedence.
185    * </pre>
186    *
187    * <code>repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;</code>
188    */
getRulesOrBuilder(int index)189   com.google.cloud.orgpolicy.v2.PolicySpec.PolicyRuleOrBuilder getRulesOrBuilder(int index);
190 
191   /**
192    *
193    *
194    * <pre>
195    * Determines the inheritance behavior for this `Policy`.
196    * If `inherit_from_parent` is true, PolicyRules set higher up in the
197    * hierarchy (up to the closest root) are inherited and present in the
198    * effective policy. If it is false, then no rules are inherited, and this
199    * Policy becomes the new root for evaluation.
200    * This field can be set only for Policies which configure list constraints.
201    * </pre>
202    *
203    * <code>bool inherit_from_parent = 4;</code>
204    *
205    * @return The inheritFromParent.
206    */
getInheritFromParent()207   boolean getInheritFromParent();
208 
209   /**
210    *
211    *
212    * <pre>
213    * Ignores policies set above this resource and restores the
214    * `constraint_default` enforcement behavior of the specific `Constraint` at
215    * this resource.
216    * This field can be set in policies for either list or boolean
217    * constraints. If set, `rules` must be empty and `inherit_from_parent`
218    * must be set to false.
219    * </pre>
220    *
221    * <code>bool reset = 5;</code>
222    *
223    * @return The reset.
224    */
getReset()225   boolean getReset();
226 }
227