• 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/tasks/v2beta3/target.proto
18 
19 package com.google.cloud.tasks.v2beta3;
20 
21 /**
22  *
23  *
24  * <pre>
25  * The HTTP method used to execute the task.
26  * </pre>
27  *
28  * Protobuf enum {@code google.cloud.tasks.v2beta3.HttpMethod}
29  */
30 public enum HttpMethod implements com.google.protobuf.ProtocolMessageEnum {
31   /**
32    *
33    *
34    * <pre>
35    * HTTP method unspecified
36    * </pre>
37    *
38    * <code>HTTP_METHOD_UNSPECIFIED = 0;</code>
39    */
40   HTTP_METHOD_UNSPECIFIED(0),
41   /**
42    *
43    *
44    * <pre>
45    * HTTP POST
46    * </pre>
47    *
48    * <code>POST = 1;</code>
49    */
50   POST(1),
51   /**
52    *
53    *
54    * <pre>
55    * HTTP GET
56    * </pre>
57    *
58    * <code>GET = 2;</code>
59    */
60   GET(2),
61   /**
62    *
63    *
64    * <pre>
65    * HTTP HEAD
66    * </pre>
67    *
68    * <code>HEAD = 3;</code>
69    */
70   HEAD(3),
71   /**
72    *
73    *
74    * <pre>
75    * HTTP PUT
76    * </pre>
77    *
78    * <code>PUT = 4;</code>
79    */
80   PUT(4),
81   /**
82    *
83    *
84    * <pre>
85    * HTTP DELETE
86    * </pre>
87    *
88    * <code>DELETE = 5;</code>
89    */
90   DELETE(5),
91   /**
92    *
93    *
94    * <pre>
95    * HTTP PATCH
96    * </pre>
97    *
98    * <code>PATCH = 6;</code>
99    */
100   PATCH(6),
101   /**
102    *
103    *
104    * <pre>
105    * HTTP OPTIONS
106    * </pre>
107    *
108    * <code>OPTIONS = 7;</code>
109    */
110   OPTIONS(7),
111   UNRECOGNIZED(-1),
112   ;
113 
114   /**
115    *
116    *
117    * <pre>
118    * HTTP method unspecified
119    * </pre>
120    *
121    * <code>HTTP_METHOD_UNSPECIFIED = 0;</code>
122    */
123   public static final int HTTP_METHOD_UNSPECIFIED_VALUE = 0;
124   /**
125    *
126    *
127    * <pre>
128    * HTTP POST
129    * </pre>
130    *
131    * <code>POST = 1;</code>
132    */
133   public static final int POST_VALUE = 1;
134   /**
135    *
136    *
137    * <pre>
138    * HTTP GET
139    * </pre>
140    *
141    * <code>GET = 2;</code>
142    */
143   public static final int GET_VALUE = 2;
144   /**
145    *
146    *
147    * <pre>
148    * HTTP HEAD
149    * </pre>
150    *
151    * <code>HEAD = 3;</code>
152    */
153   public static final int HEAD_VALUE = 3;
154   /**
155    *
156    *
157    * <pre>
158    * HTTP PUT
159    * </pre>
160    *
161    * <code>PUT = 4;</code>
162    */
163   public static final int PUT_VALUE = 4;
164   /**
165    *
166    *
167    * <pre>
168    * HTTP DELETE
169    * </pre>
170    *
171    * <code>DELETE = 5;</code>
172    */
173   public static final int DELETE_VALUE = 5;
174   /**
175    *
176    *
177    * <pre>
178    * HTTP PATCH
179    * </pre>
180    *
181    * <code>PATCH = 6;</code>
182    */
183   public static final int PATCH_VALUE = 6;
184   /**
185    *
186    *
187    * <pre>
188    * HTTP OPTIONS
189    * </pre>
190    *
191    * <code>OPTIONS = 7;</code>
192    */
193   public static final int OPTIONS_VALUE = 7;
194 
getNumber()195   public final int getNumber() {
196     if (this == UNRECOGNIZED) {
197       throw new java.lang.IllegalArgumentException(
198           "Can't get the number of an unknown enum value.");
199     }
200     return value;
201   }
202 
203   /**
204    * @param value The numeric wire value of the corresponding enum entry.
205    * @return The enum associated with the given numeric wire value.
206    * @deprecated Use {@link #forNumber(int)} instead.
207    */
208   @java.lang.Deprecated
valueOf(int value)209   public static HttpMethod valueOf(int value) {
210     return forNumber(value);
211   }
212 
213   /**
214    * @param value The numeric wire value of the corresponding enum entry.
215    * @return The enum associated with the given numeric wire value.
216    */
forNumber(int value)217   public static HttpMethod forNumber(int value) {
218     switch (value) {
219       case 0:
220         return HTTP_METHOD_UNSPECIFIED;
221       case 1:
222         return POST;
223       case 2:
224         return GET;
225       case 3:
226         return HEAD;
227       case 4:
228         return PUT;
229       case 5:
230         return DELETE;
231       case 6:
232         return PATCH;
233       case 7:
234         return OPTIONS;
235       default:
236         return null;
237     }
238   }
239 
internalGetValueMap()240   public static com.google.protobuf.Internal.EnumLiteMap<HttpMethod> internalGetValueMap() {
241     return internalValueMap;
242   }
243 
244   private static final com.google.protobuf.Internal.EnumLiteMap<HttpMethod> internalValueMap =
245       new com.google.protobuf.Internal.EnumLiteMap<HttpMethod>() {
246         public HttpMethod findValueByNumber(int number) {
247           return HttpMethod.forNumber(number);
248         }
249       };
250 
getValueDescriptor()251   public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
252     if (this == UNRECOGNIZED) {
253       throw new java.lang.IllegalStateException(
254           "Can't get the descriptor of an unrecognized enum value.");
255     }
256     return getDescriptor().getValues().get(ordinal());
257   }
258 
getDescriptorForType()259   public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
260     return getDescriptor();
261   }
262 
getDescriptor()263   public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
264     return com.google.cloud.tasks.v2beta3.TargetProto.getDescriptor().getEnumTypes().get(0);
265   }
266 
267   private static final HttpMethod[] VALUES = values();
268 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)269   public static HttpMethod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
270     if (desc.getType() != getDescriptor()) {
271       throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
272     }
273     if (desc.getIndex() == -1) {
274       return UNRECOGNIZED;
275     }
276     return VALUES[desc.getIndex()];
277   }
278 
279   private final int value;
280 
HttpMethod(int value)281   private HttpMethod(int value) {
282     this.value = value;
283   }
284 
285   // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2beta3.HttpMethod)
286 }
287