• 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/api/servicemanagement/v1/resources.proto
18 
19 package com.google.api.servicemanagement.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Generic specification of a source configuration file
26  * </pre>
27  *
28  * Protobuf type {@code google.api.servicemanagement.v1.ConfigFile}
29  */
30 public final class ConfigFile extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ConfigFile)
33     ConfigFileOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use ConfigFile.newBuilder() to construct.
ConfigFile(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private ConfigFile(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
ConfigFile()40   private ConfigFile() {
41     filePath_ = "";
42     fileContents_ = com.google.protobuf.ByteString.EMPTY;
43     fileType_ = 0;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new ConfigFile();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.api.servicemanagement.v1.ResourcesProto
59         .internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.api.servicemanagement.v1.ResourcesProto
66         .internal_static_google_api_servicemanagement_v1_ConfigFile_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.api.servicemanagement.v1.ConfigFile.class,
69             com.google.api.servicemanagement.v1.ConfigFile.Builder.class);
70   }
71 
72   /** Protobuf enum {@code google.api.servicemanagement.v1.ConfigFile.FileType} */
73   public enum FileType implements com.google.protobuf.ProtocolMessageEnum {
74     /**
75      *
76      *
77      * <pre>
78      * Unknown file type.
79      * </pre>
80      *
81      * <code>FILE_TYPE_UNSPECIFIED = 0;</code>
82      */
83     FILE_TYPE_UNSPECIFIED(0),
84     /**
85      *
86      *
87      * <pre>
88      * YAML-specification of service.
89      * </pre>
90      *
91      * <code>SERVICE_CONFIG_YAML = 1;</code>
92      */
93     SERVICE_CONFIG_YAML(1),
94     /**
95      *
96      *
97      * <pre>
98      * OpenAPI specification, serialized in JSON.
99      * </pre>
100      *
101      * <code>OPEN_API_JSON = 2;</code>
102      */
103     OPEN_API_JSON(2),
104     /**
105      *
106      *
107      * <pre>
108      * OpenAPI specification, serialized in YAML.
109      * </pre>
110      *
111      * <code>OPEN_API_YAML = 3;</code>
112      */
113     OPEN_API_YAML(3),
114     /**
115      *
116      *
117      * <pre>
118      * FileDescriptorSet, generated by protoc.
119      * To generate, use protoc with imports and source info included.
120      * For an example test.proto file, the following command would put the value
121      * in a new file named out.pb.
122      * $protoc --include_imports --include_source_info test.proto -o out.pb
123      * </pre>
124      *
125      * <code>FILE_DESCRIPTOR_SET_PROTO = 4;</code>
126      */
127     FILE_DESCRIPTOR_SET_PROTO(4),
128     /**
129      *
130      *
131      * <pre>
132      * Uncompiled Proto file. Used for storage and display purposes only,
133      * currently server-side compilation is not supported. Should match the
134      * inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A
135      * file of this type can only be included if at least one file of type
136      * FILE_DESCRIPTOR_SET_PROTO is included.
137      * </pre>
138      *
139      * <code>PROTO_FILE = 6;</code>
140      */
141     PROTO_FILE(6),
142     UNRECOGNIZED(-1),
143     ;
144 
145     /**
146      *
147      *
148      * <pre>
149      * Unknown file type.
150      * </pre>
151      *
152      * <code>FILE_TYPE_UNSPECIFIED = 0;</code>
153      */
154     public static final int FILE_TYPE_UNSPECIFIED_VALUE = 0;
155     /**
156      *
157      *
158      * <pre>
159      * YAML-specification of service.
160      * </pre>
161      *
162      * <code>SERVICE_CONFIG_YAML = 1;</code>
163      */
164     public static final int SERVICE_CONFIG_YAML_VALUE = 1;
165     /**
166      *
167      *
168      * <pre>
169      * OpenAPI specification, serialized in JSON.
170      * </pre>
171      *
172      * <code>OPEN_API_JSON = 2;</code>
173      */
174     public static final int OPEN_API_JSON_VALUE = 2;
175     /**
176      *
177      *
178      * <pre>
179      * OpenAPI specification, serialized in YAML.
180      * </pre>
181      *
182      * <code>OPEN_API_YAML = 3;</code>
183      */
184     public static final int OPEN_API_YAML_VALUE = 3;
185     /**
186      *
187      *
188      * <pre>
189      * FileDescriptorSet, generated by protoc.
190      * To generate, use protoc with imports and source info included.
191      * For an example test.proto file, the following command would put the value
192      * in a new file named out.pb.
193      * $protoc --include_imports --include_source_info test.proto -o out.pb
194      * </pre>
195      *
196      * <code>FILE_DESCRIPTOR_SET_PROTO = 4;</code>
197      */
198     public static final int FILE_DESCRIPTOR_SET_PROTO_VALUE = 4;
199     /**
200      *
201      *
202      * <pre>
203      * Uncompiled Proto file. Used for storage and display purposes only,
204      * currently server-side compilation is not supported. Should match the
205      * inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A
206      * file of this type can only be included if at least one file of type
207      * FILE_DESCRIPTOR_SET_PROTO is included.
208      * </pre>
209      *
210      * <code>PROTO_FILE = 6;</code>
211      */
212     public static final int PROTO_FILE_VALUE = 6;
213 
getNumber()214     public final int getNumber() {
215       if (this == UNRECOGNIZED) {
216         throw new java.lang.IllegalArgumentException(
217             "Can't get the number of an unknown enum value.");
218       }
219       return value;
220     }
221 
222     /**
223      * @param value The numeric wire value of the corresponding enum entry.
224      * @return The enum associated with the given numeric wire value.
225      * @deprecated Use {@link #forNumber(int)} instead.
226      */
227     @java.lang.Deprecated
valueOf(int value)228     public static FileType valueOf(int value) {
229       return forNumber(value);
230     }
231 
232     /**
233      * @param value The numeric wire value of the corresponding enum entry.
234      * @return The enum associated with the given numeric wire value.
235      */
forNumber(int value)236     public static FileType forNumber(int value) {
237       switch (value) {
238         case 0:
239           return FILE_TYPE_UNSPECIFIED;
240         case 1:
241           return SERVICE_CONFIG_YAML;
242         case 2:
243           return OPEN_API_JSON;
244         case 3:
245           return OPEN_API_YAML;
246         case 4:
247           return FILE_DESCRIPTOR_SET_PROTO;
248         case 6:
249           return PROTO_FILE;
250         default:
251           return null;
252       }
253     }
254 
internalGetValueMap()255     public static com.google.protobuf.Internal.EnumLiteMap<FileType> internalGetValueMap() {
256       return internalValueMap;
257     }
258 
259     private static final com.google.protobuf.Internal.EnumLiteMap<FileType> internalValueMap =
260         new com.google.protobuf.Internal.EnumLiteMap<FileType>() {
261           public FileType findValueByNumber(int number) {
262             return FileType.forNumber(number);
263           }
264         };
265 
getValueDescriptor()266     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
267       if (this == UNRECOGNIZED) {
268         throw new java.lang.IllegalStateException(
269             "Can't get the descriptor of an unrecognized enum value.");
270       }
271       return getDescriptor().getValues().get(ordinal());
272     }
273 
getDescriptorForType()274     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
275       return getDescriptor();
276     }
277 
getDescriptor()278     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
279       return com.google.api.servicemanagement.v1.ConfigFile.getDescriptor().getEnumTypes().get(0);
280     }
281 
282     private static final FileType[] VALUES = values();
283 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)284     public static FileType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
285       if (desc.getType() != getDescriptor()) {
286         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
287       }
288       if (desc.getIndex() == -1) {
289         return UNRECOGNIZED;
290       }
291       return VALUES[desc.getIndex()];
292     }
293 
294     private final int value;
295 
FileType(int value)296     private FileType(int value) {
297       this.value = value;
298     }
299 
300     // @@protoc_insertion_point(enum_scope:google.api.servicemanagement.v1.ConfigFile.FileType)
301   }
302 
303   public static final int FILE_PATH_FIELD_NUMBER = 1;
304 
305   @SuppressWarnings("serial")
306   private volatile java.lang.Object filePath_ = "";
307   /**
308    *
309    *
310    * <pre>
311    * The file name of the configuration file (full or relative path).
312    * </pre>
313    *
314    * <code>string file_path = 1;</code>
315    *
316    * @return The filePath.
317    */
318   @java.lang.Override
getFilePath()319   public java.lang.String getFilePath() {
320     java.lang.Object ref = filePath_;
321     if (ref instanceof java.lang.String) {
322       return (java.lang.String) ref;
323     } else {
324       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
325       java.lang.String s = bs.toStringUtf8();
326       filePath_ = s;
327       return s;
328     }
329   }
330   /**
331    *
332    *
333    * <pre>
334    * The file name of the configuration file (full or relative path).
335    * </pre>
336    *
337    * <code>string file_path = 1;</code>
338    *
339    * @return The bytes for filePath.
340    */
341   @java.lang.Override
getFilePathBytes()342   public com.google.protobuf.ByteString getFilePathBytes() {
343     java.lang.Object ref = filePath_;
344     if (ref instanceof java.lang.String) {
345       com.google.protobuf.ByteString b =
346           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
347       filePath_ = b;
348       return b;
349     } else {
350       return (com.google.protobuf.ByteString) ref;
351     }
352   }
353 
354   public static final int FILE_CONTENTS_FIELD_NUMBER = 3;
355   private com.google.protobuf.ByteString fileContents_ = com.google.protobuf.ByteString.EMPTY;
356   /**
357    *
358    *
359    * <pre>
360    * The bytes that constitute the file.
361    * </pre>
362    *
363    * <code>bytes file_contents = 3;</code>
364    *
365    * @return The fileContents.
366    */
367   @java.lang.Override
getFileContents()368   public com.google.protobuf.ByteString getFileContents() {
369     return fileContents_;
370   }
371 
372   public static final int FILE_TYPE_FIELD_NUMBER = 4;
373   private int fileType_ = 0;
374   /**
375    *
376    *
377    * <pre>
378    * The type of configuration file this represents.
379    * </pre>
380    *
381    * <code>.google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4;</code>
382    *
383    * @return The enum numeric value on the wire for fileType.
384    */
385   @java.lang.Override
getFileTypeValue()386   public int getFileTypeValue() {
387     return fileType_;
388   }
389   /**
390    *
391    *
392    * <pre>
393    * The type of configuration file this represents.
394    * </pre>
395    *
396    * <code>.google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4;</code>
397    *
398    * @return The fileType.
399    */
400   @java.lang.Override
getFileType()401   public com.google.api.servicemanagement.v1.ConfigFile.FileType getFileType() {
402     com.google.api.servicemanagement.v1.ConfigFile.FileType result =
403         com.google.api.servicemanagement.v1.ConfigFile.FileType.forNumber(fileType_);
404     return result == null
405         ? com.google.api.servicemanagement.v1.ConfigFile.FileType.UNRECOGNIZED
406         : result;
407   }
408 
409   private byte memoizedIsInitialized = -1;
410 
411   @java.lang.Override
isInitialized()412   public final boolean isInitialized() {
413     byte isInitialized = memoizedIsInitialized;
414     if (isInitialized == 1) return true;
415     if (isInitialized == 0) return false;
416 
417     memoizedIsInitialized = 1;
418     return true;
419   }
420 
421   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)422   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
423     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) {
424       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_);
425     }
426     if (!fileContents_.isEmpty()) {
427       output.writeBytes(3, fileContents_);
428     }
429     if (fileType_
430         != com.google.api.servicemanagement.v1.ConfigFile.FileType.FILE_TYPE_UNSPECIFIED
431             .getNumber()) {
432       output.writeEnum(4, fileType_);
433     }
434     getUnknownFields().writeTo(output);
435   }
436 
437   @java.lang.Override
getSerializedSize()438   public int getSerializedSize() {
439     int size = memoizedSize;
440     if (size != -1) return size;
441 
442     size = 0;
443     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) {
444       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_);
445     }
446     if (!fileContents_.isEmpty()) {
447       size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, fileContents_);
448     }
449     if (fileType_
450         != com.google.api.servicemanagement.v1.ConfigFile.FileType.FILE_TYPE_UNSPECIFIED
451             .getNumber()) {
452       size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, fileType_);
453     }
454     size += getUnknownFields().getSerializedSize();
455     memoizedSize = size;
456     return size;
457   }
458 
459   @java.lang.Override
equals(final java.lang.Object obj)460   public boolean equals(final java.lang.Object obj) {
461     if (obj == this) {
462       return true;
463     }
464     if (!(obj instanceof com.google.api.servicemanagement.v1.ConfigFile)) {
465       return super.equals(obj);
466     }
467     com.google.api.servicemanagement.v1.ConfigFile other =
468         (com.google.api.servicemanagement.v1.ConfigFile) obj;
469 
470     if (!getFilePath().equals(other.getFilePath())) return false;
471     if (!getFileContents().equals(other.getFileContents())) return false;
472     if (fileType_ != other.fileType_) return false;
473     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
474     return true;
475   }
476 
477   @java.lang.Override
hashCode()478   public int hashCode() {
479     if (memoizedHashCode != 0) {
480       return memoizedHashCode;
481     }
482     int hash = 41;
483     hash = (19 * hash) + getDescriptor().hashCode();
484     hash = (37 * hash) + FILE_PATH_FIELD_NUMBER;
485     hash = (53 * hash) + getFilePath().hashCode();
486     hash = (37 * hash) + FILE_CONTENTS_FIELD_NUMBER;
487     hash = (53 * hash) + getFileContents().hashCode();
488     hash = (37 * hash) + FILE_TYPE_FIELD_NUMBER;
489     hash = (53 * hash) + fileType_;
490     hash = (29 * hash) + getUnknownFields().hashCode();
491     memoizedHashCode = hash;
492     return hash;
493   }
494 
parseFrom(java.nio.ByteBuffer data)495   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(java.nio.ByteBuffer data)
496       throws com.google.protobuf.InvalidProtocolBufferException {
497     return PARSER.parseFrom(data);
498   }
499 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)500   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(
501       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
502       throws com.google.protobuf.InvalidProtocolBufferException {
503     return PARSER.parseFrom(data, extensionRegistry);
504   }
505 
parseFrom( com.google.protobuf.ByteString data)506   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(
507       com.google.protobuf.ByteString data)
508       throws com.google.protobuf.InvalidProtocolBufferException {
509     return PARSER.parseFrom(data);
510   }
511 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)512   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(
513       com.google.protobuf.ByteString data,
514       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
515       throws com.google.protobuf.InvalidProtocolBufferException {
516     return PARSER.parseFrom(data, extensionRegistry);
517   }
518 
parseFrom(byte[] data)519   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(byte[] data)
520       throws com.google.protobuf.InvalidProtocolBufferException {
521     return PARSER.parseFrom(data);
522   }
523 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)524   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(
525       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
526       throws com.google.protobuf.InvalidProtocolBufferException {
527     return PARSER.parseFrom(data, extensionRegistry);
528   }
529 
parseFrom(java.io.InputStream input)530   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(java.io.InputStream input)
531       throws java.io.IOException {
532     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
533   }
534 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)535   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(
536       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
537       throws java.io.IOException {
538     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
539         PARSER, input, extensionRegistry);
540   }
541 
parseDelimitedFrom( java.io.InputStream input)542   public static com.google.api.servicemanagement.v1.ConfigFile parseDelimitedFrom(
543       java.io.InputStream input) throws java.io.IOException {
544     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
545   }
546 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)547   public static com.google.api.servicemanagement.v1.ConfigFile parseDelimitedFrom(
548       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
549       throws java.io.IOException {
550     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
551         PARSER, input, extensionRegistry);
552   }
553 
parseFrom( com.google.protobuf.CodedInputStream input)554   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(
555       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
556     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
557   }
558 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)559   public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(
560       com.google.protobuf.CodedInputStream input,
561       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
562       throws java.io.IOException {
563     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
564         PARSER, input, extensionRegistry);
565   }
566 
567   @java.lang.Override
newBuilderForType()568   public Builder newBuilderForType() {
569     return newBuilder();
570   }
571 
newBuilder()572   public static Builder newBuilder() {
573     return DEFAULT_INSTANCE.toBuilder();
574   }
575 
newBuilder(com.google.api.servicemanagement.v1.ConfigFile prototype)576   public static Builder newBuilder(com.google.api.servicemanagement.v1.ConfigFile prototype) {
577     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
578   }
579 
580   @java.lang.Override
toBuilder()581   public Builder toBuilder() {
582     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
583   }
584 
585   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)586   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
587     Builder builder = new Builder(parent);
588     return builder;
589   }
590   /**
591    *
592    *
593    * <pre>
594    * Generic specification of a source configuration file
595    * </pre>
596    *
597    * Protobuf type {@code google.api.servicemanagement.v1.ConfigFile}
598    */
599   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
600       implements
601       // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ConfigFile)
602       com.google.api.servicemanagement.v1.ConfigFileOrBuilder {
getDescriptor()603     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
604       return com.google.api.servicemanagement.v1.ResourcesProto
605           .internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor;
606     }
607 
608     @java.lang.Override
609     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()610         internalGetFieldAccessorTable() {
611       return com.google.api.servicemanagement.v1.ResourcesProto
612           .internal_static_google_api_servicemanagement_v1_ConfigFile_fieldAccessorTable
613           .ensureFieldAccessorsInitialized(
614               com.google.api.servicemanagement.v1.ConfigFile.class,
615               com.google.api.servicemanagement.v1.ConfigFile.Builder.class);
616     }
617 
618     // Construct using com.google.api.servicemanagement.v1.ConfigFile.newBuilder()
Builder()619     private Builder() {}
620 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)621     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
622       super(parent);
623     }
624 
625     @java.lang.Override
clear()626     public Builder clear() {
627       super.clear();
628       bitField0_ = 0;
629       filePath_ = "";
630       fileContents_ = com.google.protobuf.ByteString.EMPTY;
631       fileType_ = 0;
632       return this;
633     }
634 
635     @java.lang.Override
getDescriptorForType()636     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
637       return com.google.api.servicemanagement.v1.ResourcesProto
638           .internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor;
639     }
640 
641     @java.lang.Override
getDefaultInstanceForType()642     public com.google.api.servicemanagement.v1.ConfigFile getDefaultInstanceForType() {
643       return com.google.api.servicemanagement.v1.ConfigFile.getDefaultInstance();
644     }
645 
646     @java.lang.Override
build()647     public com.google.api.servicemanagement.v1.ConfigFile build() {
648       com.google.api.servicemanagement.v1.ConfigFile result = buildPartial();
649       if (!result.isInitialized()) {
650         throw newUninitializedMessageException(result);
651       }
652       return result;
653     }
654 
655     @java.lang.Override
buildPartial()656     public com.google.api.servicemanagement.v1.ConfigFile buildPartial() {
657       com.google.api.servicemanagement.v1.ConfigFile result =
658           new com.google.api.servicemanagement.v1.ConfigFile(this);
659       if (bitField0_ != 0) {
660         buildPartial0(result);
661       }
662       onBuilt();
663       return result;
664     }
665 
buildPartial0(com.google.api.servicemanagement.v1.ConfigFile result)666     private void buildPartial0(com.google.api.servicemanagement.v1.ConfigFile result) {
667       int from_bitField0_ = bitField0_;
668       if (((from_bitField0_ & 0x00000001) != 0)) {
669         result.filePath_ = filePath_;
670       }
671       if (((from_bitField0_ & 0x00000002) != 0)) {
672         result.fileContents_ = fileContents_;
673       }
674       if (((from_bitField0_ & 0x00000004) != 0)) {
675         result.fileType_ = fileType_;
676       }
677     }
678 
679     @java.lang.Override
clone()680     public Builder clone() {
681       return super.clone();
682     }
683 
684     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)685     public Builder setField(
686         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
687       return super.setField(field, value);
688     }
689 
690     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)691     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
692       return super.clearField(field);
693     }
694 
695     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)696     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
697       return super.clearOneof(oneof);
698     }
699 
700     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)701     public Builder setRepeatedField(
702         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
703       return super.setRepeatedField(field, index, value);
704     }
705 
706     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)707     public Builder addRepeatedField(
708         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
709       return super.addRepeatedField(field, value);
710     }
711 
712     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)713     public Builder mergeFrom(com.google.protobuf.Message other) {
714       if (other instanceof com.google.api.servicemanagement.v1.ConfigFile) {
715         return mergeFrom((com.google.api.servicemanagement.v1.ConfigFile) other);
716       } else {
717         super.mergeFrom(other);
718         return this;
719       }
720     }
721 
mergeFrom(com.google.api.servicemanagement.v1.ConfigFile other)722     public Builder mergeFrom(com.google.api.servicemanagement.v1.ConfigFile other) {
723       if (other == com.google.api.servicemanagement.v1.ConfigFile.getDefaultInstance()) return this;
724       if (!other.getFilePath().isEmpty()) {
725         filePath_ = other.filePath_;
726         bitField0_ |= 0x00000001;
727         onChanged();
728       }
729       if (other.getFileContents() != com.google.protobuf.ByteString.EMPTY) {
730         setFileContents(other.getFileContents());
731       }
732       if (other.fileType_ != 0) {
733         setFileTypeValue(other.getFileTypeValue());
734       }
735       this.mergeUnknownFields(other.getUnknownFields());
736       onChanged();
737       return this;
738     }
739 
740     @java.lang.Override
isInitialized()741     public final boolean isInitialized() {
742       return true;
743     }
744 
745     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)746     public Builder mergeFrom(
747         com.google.protobuf.CodedInputStream input,
748         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
749         throws java.io.IOException {
750       if (extensionRegistry == null) {
751         throw new java.lang.NullPointerException();
752       }
753       try {
754         boolean done = false;
755         while (!done) {
756           int tag = input.readTag();
757           switch (tag) {
758             case 0:
759               done = true;
760               break;
761             case 10:
762               {
763                 filePath_ = input.readStringRequireUtf8();
764                 bitField0_ |= 0x00000001;
765                 break;
766               } // case 10
767             case 26:
768               {
769                 fileContents_ = input.readBytes();
770                 bitField0_ |= 0x00000002;
771                 break;
772               } // case 26
773             case 32:
774               {
775                 fileType_ = input.readEnum();
776                 bitField0_ |= 0x00000004;
777                 break;
778               } // case 32
779             default:
780               {
781                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
782                   done = true; // was an endgroup tag
783                 }
784                 break;
785               } // default:
786           } // switch (tag)
787         } // while (!done)
788       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
789         throw e.unwrapIOException();
790       } finally {
791         onChanged();
792       } // finally
793       return this;
794     }
795 
796     private int bitField0_;
797 
798     private java.lang.Object filePath_ = "";
799     /**
800      *
801      *
802      * <pre>
803      * The file name of the configuration file (full or relative path).
804      * </pre>
805      *
806      * <code>string file_path = 1;</code>
807      *
808      * @return The filePath.
809      */
getFilePath()810     public java.lang.String getFilePath() {
811       java.lang.Object ref = filePath_;
812       if (!(ref instanceof java.lang.String)) {
813         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
814         java.lang.String s = bs.toStringUtf8();
815         filePath_ = s;
816         return s;
817       } else {
818         return (java.lang.String) ref;
819       }
820     }
821     /**
822      *
823      *
824      * <pre>
825      * The file name of the configuration file (full or relative path).
826      * </pre>
827      *
828      * <code>string file_path = 1;</code>
829      *
830      * @return The bytes for filePath.
831      */
getFilePathBytes()832     public com.google.protobuf.ByteString getFilePathBytes() {
833       java.lang.Object ref = filePath_;
834       if (ref instanceof String) {
835         com.google.protobuf.ByteString b =
836             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
837         filePath_ = b;
838         return b;
839       } else {
840         return (com.google.protobuf.ByteString) ref;
841       }
842     }
843     /**
844      *
845      *
846      * <pre>
847      * The file name of the configuration file (full or relative path).
848      * </pre>
849      *
850      * <code>string file_path = 1;</code>
851      *
852      * @param value The filePath to set.
853      * @return This builder for chaining.
854      */
setFilePath(java.lang.String value)855     public Builder setFilePath(java.lang.String value) {
856       if (value == null) {
857         throw new NullPointerException();
858       }
859       filePath_ = value;
860       bitField0_ |= 0x00000001;
861       onChanged();
862       return this;
863     }
864     /**
865      *
866      *
867      * <pre>
868      * The file name of the configuration file (full or relative path).
869      * </pre>
870      *
871      * <code>string file_path = 1;</code>
872      *
873      * @return This builder for chaining.
874      */
clearFilePath()875     public Builder clearFilePath() {
876       filePath_ = getDefaultInstance().getFilePath();
877       bitField0_ = (bitField0_ & ~0x00000001);
878       onChanged();
879       return this;
880     }
881     /**
882      *
883      *
884      * <pre>
885      * The file name of the configuration file (full or relative path).
886      * </pre>
887      *
888      * <code>string file_path = 1;</code>
889      *
890      * @param value The bytes for filePath to set.
891      * @return This builder for chaining.
892      */
setFilePathBytes(com.google.protobuf.ByteString value)893     public Builder setFilePathBytes(com.google.protobuf.ByteString value) {
894       if (value == null) {
895         throw new NullPointerException();
896       }
897       checkByteStringIsUtf8(value);
898       filePath_ = value;
899       bitField0_ |= 0x00000001;
900       onChanged();
901       return this;
902     }
903 
904     private com.google.protobuf.ByteString fileContents_ = com.google.protobuf.ByteString.EMPTY;
905     /**
906      *
907      *
908      * <pre>
909      * The bytes that constitute the file.
910      * </pre>
911      *
912      * <code>bytes file_contents = 3;</code>
913      *
914      * @return The fileContents.
915      */
916     @java.lang.Override
getFileContents()917     public com.google.protobuf.ByteString getFileContents() {
918       return fileContents_;
919     }
920     /**
921      *
922      *
923      * <pre>
924      * The bytes that constitute the file.
925      * </pre>
926      *
927      * <code>bytes file_contents = 3;</code>
928      *
929      * @param value The fileContents to set.
930      * @return This builder for chaining.
931      */
setFileContents(com.google.protobuf.ByteString value)932     public Builder setFileContents(com.google.protobuf.ByteString value) {
933       if (value == null) {
934         throw new NullPointerException();
935       }
936       fileContents_ = value;
937       bitField0_ |= 0x00000002;
938       onChanged();
939       return this;
940     }
941     /**
942      *
943      *
944      * <pre>
945      * The bytes that constitute the file.
946      * </pre>
947      *
948      * <code>bytes file_contents = 3;</code>
949      *
950      * @return This builder for chaining.
951      */
clearFileContents()952     public Builder clearFileContents() {
953       bitField0_ = (bitField0_ & ~0x00000002);
954       fileContents_ = getDefaultInstance().getFileContents();
955       onChanged();
956       return this;
957     }
958 
959     private int fileType_ = 0;
960     /**
961      *
962      *
963      * <pre>
964      * The type of configuration file this represents.
965      * </pre>
966      *
967      * <code>.google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4;</code>
968      *
969      * @return The enum numeric value on the wire for fileType.
970      */
971     @java.lang.Override
getFileTypeValue()972     public int getFileTypeValue() {
973       return fileType_;
974     }
975     /**
976      *
977      *
978      * <pre>
979      * The type of configuration file this represents.
980      * </pre>
981      *
982      * <code>.google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4;</code>
983      *
984      * @param value The enum numeric value on the wire for fileType to set.
985      * @return This builder for chaining.
986      */
setFileTypeValue(int value)987     public Builder setFileTypeValue(int value) {
988       fileType_ = value;
989       bitField0_ |= 0x00000004;
990       onChanged();
991       return this;
992     }
993     /**
994      *
995      *
996      * <pre>
997      * The type of configuration file this represents.
998      * </pre>
999      *
1000      * <code>.google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4;</code>
1001      *
1002      * @return The fileType.
1003      */
1004     @java.lang.Override
getFileType()1005     public com.google.api.servicemanagement.v1.ConfigFile.FileType getFileType() {
1006       com.google.api.servicemanagement.v1.ConfigFile.FileType result =
1007           com.google.api.servicemanagement.v1.ConfigFile.FileType.forNumber(fileType_);
1008       return result == null
1009           ? com.google.api.servicemanagement.v1.ConfigFile.FileType.UNRECOGNIZED
1010           : result;
1011     }
1012     /**
1013      *
1014      *
1015      * <pre>
1016      * The type of configuration file this represents.
1017      * </pre>
1018      *
1019      * <code>.google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4;</code>
1020      *
1021      * @param value The fileType to set.
1022      * @return This builder for chaining.
1023      */
setFileType(com.google.api.servicemanagement.v1.ConfigFile.FileType value)1024     public Builder setFileType(com.google.api.servicemanagement.v1.ConfigFile.FileType value) {
1025       if (value == null) {
1026         throw new NullPointerException();
1027       }
1028       bitField0_ |= 0x00000004;
1029       fileType_ = value.getNumber();
1030       onChanged();
1031       return this;
1032     }
1033     /**
1034      *
1035      *
1036      * <pre>
1037      * The type of configuration file this represents.
1038      * </pre>
1039      *
1040      * <code>.google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4;</code>
1041      *
1042      * @return This builder for chaining.
1043      */
clearFileType()1044     public Builder clearFileType() {
1045       bitField0_ = (bitField0_ & ~0x00000004);
1046       fileType_ = 0;
1047       onChanged();
1048       return this;
1049     }
1050 
1051     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1052     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1053       return super.setUnknownFields(unknownFields);
1054     }
1055 
1056     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1057     public final Builder mergeUnknownFields(
1058         final com.google.protobuf.UnknownFieldSet unknownFields) {
1059       return super.mergeUnknownFields(unknownFields);
1060     }
1061 
1062     // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ConfigFile)
1063   }
1064 
1065   // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ConfigFile)
1066   private static final com.google.api.servicemanagement.v1.ConfigFile DEFAULT_INSTANCE;
1067 
1068   static {
1069     DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ConfigFile();
1070   }
1071 
getDefaultInstance()1072   public static com.google.api.servicemanagement.v1.ConfigFile getDefaultInstance() {
1073     return DEFAULT_INSTANCE;
1074   }
1075 
1076   private static final com.google.protobuf.Parser<ConfigFile> PARSER =
1077       new com.google.protobuf.AbstractParser<ConfigFile>() {
1078         @java.lang.Override
1079         public ConfigFile parsePartialFrom(
1080             com.google.protobuf.CodedInputStream input,
1081             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1082             throws com.google.protobuf.InvalidProtocolBufferException {
1083           Builder builder = newBuilder();
1084           try {
1085             builder.mergeFrom(input, extensionRegistry);
1086           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1087             throw e.setUnfinishedMessage(builder.buildPartial());
1088           } catch (com.google.protobuf.UninitializedMessageException e) {
1089             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1090           } catch (java.io.IOException e) {
1091             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1092                 .setUnfinishedMessage(builder.buildPartial());
1093           }
1094           return builder.buildPartial();
1095         }
1096       };
1097 
parser()1098   public static com.google.protobuf.Parser<ConfigFile> parser() {
1099     return PARSER;
1100   }
1101 
1102   @java.lang.Override
getParserForType()1103   public com.google.protobuf.Parser<ConfigFile> getParserForType() {
1104     return PARSER;
1105   }
1106 
1107   @java.lang.Override
getDefaultInstanceForType()1108   public com.google.api.servicemanagement.v1.ConfigFile getDefaultInstanceForType() {
1109     return DEFAULT_INSTANCE;
1110   }
1111 }
1112