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/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 public interface CorsPolicyOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.compute.v1.CorsPolicy) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false. 31 * </pre> 32 * 33 * <code>optional bool allow_credentials = 481263366;</code> 34 * 35 * @return Whether the allowCredentials field is set. 36 */ hasAllowCredentials()37 boolean hasAllowCredentials(); 38 /** 39 * 40 * 41 * <pre> 42 * In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false. 43 * </pre> 44 * 45 * <code>optional bool allow_credentials = 481263366;</code> 46 * 47 * @return The allowCredentials. 48 */ getAllowCredentials()49 boolean getAllowCredentials(); 50 51 /** 52 * 53 * 54 * <pre> 55 * Specifies the content for the Access-Control-Allow-Headers header. 56 * </pre> 57 * 58 * <code>repeated string allow_headers = 45179024;</code> 59 * 60 * @return A list containing the allowHeaders. 61 */ getAllowHeadersList()62 java.util.List<java.lang.String> getAllowHeadersList(); 63 /** 64 * 65 * 66 * <pre> 67 * Specifies the content for the Access-Control-Allow-Headers header. 68 * </pre> 69 * 70 * <code>repeated string allow_headers = 45179024;</code> 71 * 72 * @return The count of allowHeaders. 73 */ getAllowHeadersCount()74 int getAllowHeadersCount(); 75 /** 76 * 77 * 78 * <pre> 79 * Specifies the content for the Access-Control-Allow-Headers header. 80 * </pre> 81 * 82 * <code>repeated string allow_headers = 45179024;</code> 83 * 84 * @param index The index of the element to return. 85 * @return The allowHeaders at the given index. 86 */ getAllowHeaders(int index)87 java.lang.String getAllowHeaders(int index); 88 /** 89 * 90 * 91 * <pre> 92 * Specifies the content for the Access-Control-Allow-Headers header. 93 * </pre> 94 * 95 * <code>repeated string allow_headers = 45179024;</code> 96 * 97 * @param index The index of the value to return. 98 * @return The bytes of the allowHeaders at the given index. 99 */ getAllowHeadersBytes(int index)100 com.google.protobuf.ByteString getAllowHeadersBytes(int index); 101 102 /** 103 * 104 * 105 * <pre> 106 * Specifies the content for the Access-Control-Allow-Methods header. 107 * </pre> 108 * 109 * <code>repeated string allow_methods = 205405372;</code> 110 * 111 * @return A list containing the allowMethods. 112 */ getAllowMethodsList()113 java.util.List<java.lang.String> getAllowMethodsList(); 114 /** 115 * 116 * 117 * <pre> 118 * Specifies the content for the Access-Control-Allow-Methods header. 119 * </pre> 120 * 121 * <code>repeated string allow_methods = 205405372;</code> 122 * 123 * @return The count of allowMethods. 124 */ getAllowMethodsCount()125 int getAllowMethodsCount(); 126 /** 127 * 128 * 129 * <pre> 130 * Specifies the content for the Access-Control-Allow-Methods header. 131 * </pre> 132 * 133 * <code>repeated string allow_methods = 205405372;</code> 134 * 135 * @param index The index of the element to return. 136 * @return The allowMethods at the given index. 137 */ getAllowMethods(int index)138 java.lang.String getAllowMethods(int index); 139 /** 140 * 141 * 142 * <pre> 143 * Specifies the content for the Access-Control-Allow-Methods header. 144 * </pre> 145 * 146 * <code>repeated string allow_methods = 205405372;</code> 147 * 148 * @param index The index of the value to return. 149 * @return The bytes of the allowMethods at the given index. 150 */ getAllowMethodsBytes(int index)151 com.google.protobuf.ByteString getAllowMethodsBytes(int index); 152 153 /** 154 * 155 * 156 * <pre> 157 * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 158 * </pre> 159 * 160 * <code>repeated string allow_origin_regexes = 215385810;</code> 161 * 162 * @return A list containing the allowOriginRegexes. 163 */ getAllowOriginRegexesList()164 java.util.List<java.lang.String> getAllowOriginRegexesList(); 165 /** 166 * 167 * 168 * <pre> 169 * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 170 * </pre> 171 * 172 * <code>repeated string allow_origin_regexes = 215385810;</code> 173 * 174 * @return The count of allowOriginRegexes. 175 */ getAllowOriginRegexesCount()176 int getAllowOriginRegexesCount(); 177 /** 178 * 179 * 180 * <pre> 181 * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 182 * </pre> 183 * 184 * <code>repeated string allow_origin_regexes = 215385810;</code> 185 * 186 * @param index The index of the element to return. 187 * @return The allowOriginRegexes at the given index. 188 */ getAllowOriginRegexes(int index)189 java.lang.String getAllowOriginRegexes(int index); 190 /** 191 * 192 * 193 * <pre> 194 * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 195 * </pre> 196 * 197 * <code>repeated string allow_origin_regexes = 215385810;</code> 198 * 199 * @param index The index of the value to return. 200 * @return The bytes of the allowOriginRegexes at the given index. 201 */ getAllowOriginRegexesBytes(int index)202 com.google.protobuf.ByteString getAllowOriginRegexesBytes(int index); 203 204 /** 205 * 206 * 207 * <pre> 208 * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. 209 * </pre> 210 * 211 * <code>repeated string allow_origins = 194914071;</code> 212 * 213 * @return A list containing the allowOrigins. 214 */ getAllowOriginsList()215 java.util.List<java.lang.String> getAllowOriginsList(); 216 /** 217 * 218 * 219 * <pre> 220 * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. 221 * </pre> 222 * 223 * <code>repeated string allow_origins = 194914071;</code> 224 * 225 * @return The count of allowOrigins. 226 */ getAllowOriginsCount()227 int getAllowOriginsCount(); 228 /** 229 * 230 * 231 * <pre> 232 * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. 233 * </pre> 234 * 235 * <code>repeated string allow_origins = 194914071;</code> 236 * 237 * @param index The index of the element to return. 238 * @return The allowOrigins at the given index. 239 */ getAllowOrigins(int index)240 java.lang.String getAllowOrigins(int index); 241 /** 242 * 243 * 244 * <pre> 245 * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. 246 * </pre> 247 * 248 * <code>repeated string allow_origins = 194914071;</code> 249 * 250 * @param index The index of the value to return. 251 * @return The bytes of the allowOrigins at the given index. 252 */ getAllowOriginsBytes(int index)253 com.google.protobuf.ByteString getAllowOriginsBytes(int index); 254 255 /** 256 * 257 * 258 * <pre> 259 * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. 260 * </pre> 261 * 262 * <code>optional bool disabled = 270940796;</code> 263 * 264 * @return Whether the disabled field is set. 265 */ hasDisabled()266 boolean hasDisabled(); 267 /** 268 * 269 * 270 * <pre> 271 * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. 272 * </pre> 273 * 274 * <code>optional bool disabled = 270940796;</code> 275 * 276 * @return The disabled. 277 */ getDisabled()278 boolean getDisabled(); 279 280 /** 281 * 282 * 283 * <pre> 284 * Specifies the content for the Access-Control-Expose-Headers header. 285 * </pre> 286 * 287 * <code>repeated string expose_headers = 247604747;</code> 288 * 289 * @return A list containing the exposeHeaders. 290 */ getExposeHeadersList()291 java.util.List<java.lang.String> getExposeHeadersList(); 292 /** 293 * 294 * 295 * <pre> 296 * Specifies the content for the Access-Control-Expose-Headers header. 297 * </pre> 298 * 299 * <code>repeated string expose_headers = 247604747;</code> 300 * 301 * @return The count of exposeHeaders. 302 */ getExposeHeadersCount()303 int getExposeHeadersCount(); 304 /** 305 * 306 * 307 * <pre> 308 * Specifies the content for the Access-Control-Expose-Headers header. 309 * </pre> 310 * 311 * <code>repeated string expose_headers = 247604747;</code> 312 * 313 * @param index The index of the element to return. 314 * @return The exposeHeaders at the given index. 315 */ getExposeHeaders(int index)316 java.lang.String getExposeHeaders(int index); 317 /** 318 * 319 * 320 * <pre> 321 * Specifies the content for the Access-Control-Expose-Headers header. 322 * </pre> 323 * 324 * <code>repeated string expose_headers = 247604747;</code> 325 * 326 * @param index The index of the value to return. 327 * @return The bytes of the exposeHeaders at the given index. 328 */ getExposeHeadersBytes(int index)329 com.google.protobuf.ByteString getExposeHeadersBytes(int index); 330 331 /** 332 * 333 * 334 * <pre> 335 * Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header. 336 * </pre> 337 * 338 * <code>optional int32 max_age = 307559332;</code> 339 * 340 * @return Whether the maxAge field is set. 341 */ hasMaxAge()342 boolean hasMaxAge(); 343 /** 344 * 345 * 346 * <pre> 347 * Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header. 348 * </pre> 349 * 350 * <code>optional int32 max_age = 307559332;</code> 351 * 352 * @return The maxAge. 353 */ getMaxAge()354 int getMaxAge(); 355 } 356