• 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/asset/v1p2beta1/asset_service.proto
18 
19 package com.google.cloud.asset.v1p2beta1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * An asset feed used to export asset updates to a destinations.
26  * An asset feed filter controls what updates are exported.
27  * The asset feed must be created within a project, organization, or
28  * folder. Supported destinations are:
29  * Cloud Pub/Sub topics.
30  * </pre>
31  *
32  * Protobuf type {@code google.cloud.asset.v1p2beta1.Feed}
33  */
34 public final class Feed extends com.google.protobuf.GeneratedMessageV3
35     implements
36     // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.Feed)
37     FeedOrBuilder {
38   private static final long serialVersionUID = 0L;
39   // Use Feed.newBuilder() to construct.
Feed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)40   private Feed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
41     super(builder);
42   }
43 
Feed()44   private Feed() {
45     name_ = "";
46     assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
47     assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
48     contentType_ = 0;
49   }
50 
51   @java.lang.Override
52   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)53   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
54     return new Feed();
55   }
56 
57   @java.lang.Override
getUnknownFields()58   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
59     return this.unknownFields;
60   }
61 
getDescriptor()62   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
63     return com.google.cloud.asset.v1p2beta1.AssetServiceProto
64         .internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor;
65   }
66 
67   @java.lang.Override
68   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()69       internalGetFieldAccessorTable() {
70     return com.google.cloud.asset.v1p2beta1.AssetServiceProto
71         .internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable
72         .ensureFieldAccessorsInitialized(
73             com.google.cloud.asset.v1p2beta1.Feed.class,
74             com.google.cloud.asset.v1p2beta1.Feed.Builder.class);
75   }
76 
77   public static final int NAME_FIELD_NUMBER = 1;
78 
79   @SuppressWarnings("serial")
80   private volatile java.lang.Object name_ = "";
81   /**
82    *
83    *
84    * <pre>
85    * Required. The format will be
86    * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
87    * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
88    * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
89    * The client-assigned feed identifier must be unique within the parent
90    * project/folder/organization.
91    * </pre>
92    *
93    * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
94    *
95    * @return The name.
96    */
97   @java.lang.Override
getName()98   public java.lang.String getName() {
99     java.lang.Object ref = name_;
100     if (ref instanceof java.lang.String) {
101       return (java.lang.String) ref;
102     } else {
103       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
104       java.lang.String s = bs.toStringUtf8();
105       name_ = s;
106       return s;
107     }
108   }
109   /**
110    *
111    *
112    * <pre>
113    * Required. The format will be
114    * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
115    * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
116    * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
117    * The client-assigned feed identifier must be unique within the parent
118    * project/folder/organization.
119    * </pre>
120    *
121    * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
122    *
123    * @return The bytes for name.
124    */
125   @java.lang.Override
getNameBytes()126   public com.google.protobuf.ByteString getNameBytes() {
127     java.lang.Object ref = name_;
128     if (ref instanceof java.lang.String) {
129       com.google.protobuf.ByteString b =
130           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
131       name_ = b;
132       return b;
133     } else {
134       return (com.google.protobuf.ByteString) ref;
135     }
136   }
137 
138   public static final int ASSET_NAMES_FIELD_NUMBER = 2;
139 
140   @SuppressWarnings("serial")
141   private com.google.protobuf.LazyStringList assetNames_;
142   /**
143    *
144    *
145    * <pre>
146    * A list of the full names of the assets to receive updates. You must specify
147    * either or both of asset_names and asset_types. Only asset updates matching
148    * specified asset_names and asset_types are exported to the feed. For
149    * example:
150    * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
151    * See [Resource
152    * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
153    * for more info.
154    * </pre>
155    *
156    * <code>repeated string asset_names = 2;</code>
157    *
158    * @return A list containing the assetNames.
159    */
getAssetNamesList()160   public com.google.protobuf.ProtocolStringList getAssetNamesList() {
161     return assetNames_;
162   }
163   /**
164    *
165    *
166    * <pre>
167    * A list of the full names of the assets to receive updates. You must specify
168    * either or both of asset_names and asset_types. Only asset updates matching
169    * specified asset_names and asset_types are exported to the feed. For
170    * example:
171    * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
172    * See [Resource
173    * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
174    * for more info.
175    * </pre>
176    *
177    * <code>repeated string asset_names = 2;</code>
178    *
179    * @return The count of assetNames.
180    */
getAssetNamesCount()181   public int getAssetNamesCount() {
182     return assetNames_.size();
183   }
184   /**
185    *
186    *
187    * <pre>
188    * A list of the full names of the assets to receive updates. You must specify
189    * either or both of asset_names and asset_types. Only asset updates matching
190    * specified asset_names and asset_types are exported to the feed. For
191    * example:
192    * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
193    * See [Resource
194    * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
195    * for more info.
196    * </pre>
197    *
198    * <code>repeated string asset_names = 2;</code>
199    *
200    * @param index The index of the element to return.
201    * @return The assetNames at the given index.
202    */
getAssetNames(int index)203   public java.lang.String getAssetNames(int index) {
204     return assetNames_.get(index);
205   }
206   /**
207    *
208    *
209    * <pre>
210    * A list of the full names of the assets to receive updates. You must specify
211    * either or both of asset_names and asset_types. Only asset updates matching
212    * specified asset_names and asset_types are exported to the feed. For
213    * example:
214    * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
215    * See [Resource
216    * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
217    * for more info.
218    * </pre>
219    *
220    * <code>repeated string asset_names = 2;</code>
221    *
222    * @param index The index of the value to return.
223    * @return The bytes of the assetNames at the given index.
224    */
getAssetNamesBytes(int index)225   public com.google.protobuf.ByteString getAssetNamesBytes(int index) {
226     return assetNames_.getByteString(index);
227   }
228 
229   public static final int ASSET_TYPES_FIELD_NUMBER = 3;
230 
231   @SuppressWarnings("serial")
232   private com.google.protobuf.LazyStringList assetTypes_;
233   /**
234    *
235    *
236    * <pre>
237    * A list of types of the assets to receive updates. You must specify either
238    * or both of asset_names and asset_types. Only asset updates matching
239    * specified asset_names and asset_types are exported to the feed.
240    * For example:
241    * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
242    * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
243    * for all supported asset types.
244    * </pre>
245    *
246    * <code>repeated string asset_types = 3;</code>
247    *
248    * @return A list containing the assetTypes.
249    */
getAssetTypesList()250   public com.google.protobuf.ProtocolStringList getAssetTypesList() {
251     return assetTypes_;
252   }
253   /**
254    *
255    *
256    * <pre>
257    * A list of types of the assets to receive updates. You must specify either
258    * or both of asset_names and asset_types. Only asset updates matching
259    * specified asset_names and asset_types are exported to the feed.
260    * For example:
261    * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
262    * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
263    * for all supported asset types.
264    * </pre>
265    *
266    * <code>repeated string asset_types = 3;</code>
267    *
268    * @return The count of assetTypes.
269    */
getAssetTypesCount()270   public int getAssetTypesCount() {
271     return assetTypes_.size();
272   }
273   /**
274    *
275    *
276    * <pre>
277    * A list of types of the assets to receive updates. You must specify either
278    * or both of asset_names and asset_types. Only asset updates matching
279    * specified asset_names and asset_types are exported to the feed.
280    * For example:
281    * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
282    * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
283    * for all supported asset types.
284    * </pre>
285    *
286    * <code>repeated string asset_types = 3;</code>
287    *
288    * @param index The index of the element to return.
289    * @return The assetTypes at the given index.
290    */
getAssetTypes(int index)291   public java.lang.String getAssetTypes(int index) {
292     return assetTypes_.get(index);
293   }
294   /**
295    *
296    *
297    * <pre>
298    * A list of types of the assets to receive updates. You must specify either
299    * or both of asset_names and asset_types. Only asset updates matching
300    * specified asset_names and asset_types are exported to the feed.
301    * For example:
302    * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
303    * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
304    * for all supported asset types.
305    * </pre>
306    *
307    * <code>repeated string asset_types = 3;</code>
308    *
309    * @param index The index of the value to return.
310    * @return The bytes of the assetTypes at the given index.
311    */
getAssetTypesBytes(int index)312   public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
313     return assetTypes_.getByteString(index);
314   }
315 
316   public static final int CONTENT_TYPE_FIELD_NUMBER = 4;
317   private int contentType_ = 0;
318   /**
319    *
320    *
321    * <pre>
322    * Asset content type. If not specified, no content but the asset name and
323    * type will be returned.
324    * </pre>
325    *
326    * <code>.google.cloud.asset.v1p2beta1.ContentType content_type = 4;</code>
327    *
328    * @return The enum numeric value on the wire for contentType.
329    */
330   @java.lang.Override
getContentTypeValue()331   public int getContentTypeValue() {
332     return contentType_;
333   }
334   /**
335    *
336    *
337    * <pre>
338    * Asset content type. If not specified, no content but the asset name and
339    * type will be returned.
340    * </pre>
341    *
342    * <code>.google.cloud.asset.v1p2beta1.ContentType content_type = 4;</code>
343    *
344    * @return The contentType.
345    */
346   @java.lang.Override
getContentType()347   public com.google.cloud.asset.v1p2beta1.ContentType getContentType() {
348     com.google.cloud.asset.v1p2beta1.ContentType result =
349         com.google.cloud.asset.v1p2beta1.ContentType.forNumber(contentType_);
350     return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result;
351   }
352 
353   public static final int FEED_OUTPUT_CONFIG_FIELD_NUMBER = 5;
354   private com.google.cloud.asset.v1p2beta1.FeedOutputConfig feedOutputConfig_;
355   /**
356    *
357    *
358    * <pre>
359    * Required. Feed output configuration defining where the asset updates are
360    * published to.
361    * </pre>
362    *
363    * <code>
364    * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
365    * </code>
366    *
367    * @return Whether the feedOutputConfig field is set.
368    */
369   @java.lang.Override
hasFeedOutputConfig()370   public boolean hasFeedOutputConfig() {
371     return feedOutputConfig_ != null;
372   }
373   /**
374    *
375    *
376    * <pre>
377    * Required. Feed output configuration defining where the asset updates are
378    * published to.
379    * </pre>
380    *
381    * <code>
382    * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
383    * </code>
384    *
385    * @return The feedOutputConfig.
386    */
387   @java.lang.Override
getFeedOutputConfig()388   public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig() {
389     return feedOutputConfig_ == null
390         ? com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance()
391         : feedOutputConfig_;
392   }
393   /**
394    *
395    *
396    * <pre>
397    * Required. Feed output configuration defining where the asset updates are
398    * published to.
399    * </pre>
400    *
401    * <code>
402    * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
403    * </code>
404    */
405   @java.lang.Override
getFeedOutputConfigOrBuilder()406   public com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() {
407     return feedOutputConfig_ == null
408         ? com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance()
409         : feedOutputConfig_;
410   }
411 
412   private byte memoizedIsInitialized = -1;
413 
414   @java.lang.Override
isInitialized()415   public final boolean isInitialized() {
416     byte isInitialized = memoizedIsInitialized;
417     if (isInitialized == 1) return true;
418     if (isInitialized == 0) return false;
419 
420     memoizedIsInitialized = 1;
421     return true;
422   }
423 
424   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)425   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
426     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
427       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
428     }
429     for (int i = 0; i < assetNames_.size(); i++) {
430       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i));
431     }
432     for (int i = 0; i < assetTypes_.size(); i++) {
433       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i));
434     }
435     if (contentType_
436         != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) {
437       output.writeEnum(4, contentType_);
438     }
439     if (feedOutputConfig_ != null) {
440       output.writeMessage(5, getFeedOutputConfig());
441     }
442     getUnknownFields().writeTo(output);
443   }
444 
445   @java.lang.Override
getSerializedSize()446   public int getSerializedSize() {
447     int size = memoizedSize;
448     if (size != -1) return size;
449 
450     size = 0;
451     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
452       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
453     }
454     {
455       int dataSize = 0;
456       for (int i = 0; i < assetNames_.size(); i++) {
457         dataSize += computeStringSizeNoTag(assetNames_.getRaw(i));
458       }
459       size += dataSize;
460       size += 1 * getAssetNamesList().size();
461     }
462     {
463       int dataSize = 0;
464       for (int i = 0; i < assetTypes_.size(); i++) {
465         dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i));
466       }
467       size += dataSize;
468       size += 1 * getAssetTypesList().size();
469     }
470     if (contentType_
471         != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) {
472       size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, contentType_);
473     }
474     if (feedOutputConfig_ != null) {
475       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFeedOutputConfig());
476     }
477     size += getUnknownFields().getSerializedSize();
478     memoizedSize = size;
479     return size;
480   }
481 
482   @java.lang.Override
equals(final java.lang.Object obj)483   public boolean equals(final java.lang.Object obj) {
484     if (obj == this) {
485       return true;
486     }
487     if (!(obj instanceof com.google.cloud.asset.v1p2beta1.Feed)) {
488       return super.equals(obj);
489     }
490     com.google.cloud.asset.v1p2beta1.Feed other = (com.google.cloud.asset.v1p2beta1.Feed) obj;
491 
492     if (!getName().equals(other.getName())) return false;
493     if (!getAssetNamesList().equals(other.getAssetNamesList())) return false;
494     if (!getAssetTypesList().equals(other.getAssetTypesList())) return false;
495     if (contentType_ != other.contentType_) return false;
496     if (hasFeedOutputConfig() != other.hasFeedOutputConfig()) return false;
497     if (hasFeedOutputConfig()) {
498       if (!getFeedOutputConfig().equals(other.getFeedOutputConfig())) return false;
499     }
500     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
501     return true;
502   }
503 
504   @java.lang.Override
hashCode()505   public int hashCode() {
506     if (memoizedHashCode != 0) {
507       return memoizedHashCode;
508     }
509     int hash = 41;
510     hash = (19 * hash) + getDescriptor().hashCode();
511     hash = (37 * hash) + NAME_FIELD_NUMBER;
512     hash = (53 * hash) + getName().hashCode();
513     if (getAssetNamesCount() > 0) {
514       hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER;
515       hash = (53 * hash) + getAssetNamesList().hashCode();
516     }
517     if (getAssetTypesCount() > 0) {
518       hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER;
519       hash = (53 * hash) + getAssetTypesList().hashCode();
520     }
521     hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER;
522     hash = (53 * hash) + contentType_;
523     if (hasFeedOutputConfig()) {
524       hash = (37 * hash) + FEED_OUTPUT_CONFIG_FIELD_NUMBER;
525       hash = (53 * hash) + getFeedOutputConfig().hashCode();
526     }
527     hash = (29 * hash) + getUnknownFields().hashCode();
528     memoizedHashCode = hash;
529     return hash;
530   }
531 
parseFrom(java.nio.ByteBuffer data)532   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(java.nio.ByteBuffer data)
533       throws com.google.protobuf.InvalidProtocolBufferException {
534     return PARSER.parseFrom(data);
535   }
536 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)537   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(
538       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
539       throws com.google.protobuf.InvalidProtocolBufferException {
540     return PARSER.parseFrom(data, extensionRegistry);
541   }
542 
parseFrom(com.google.protobuf.ByteString data)543   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(com.google.protobuf.ByteString data)
544       throws com.google.protobuf.InvalidProtocolBufferException {
545     return PARSER.parseFrom(data);
546   }
547 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)548   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(
549       com.google.protobuf.ByteString data,
550       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
551       throws com.google.protobuf.InvalidProtocolBufferException {
552     return PARSER.parseFrom(data, extensionRegistry);
553   }
554 
parseFrom(byte[] data)555   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(byte[] data)
556       throws com.google.protobuf.InvalidProtocolBufferException {
557     return PARSER.parseFrom(data);
558   }
559 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)560   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(
561       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
562       throws com.google.protobuf.InvalidProtocolBufferException {
563     return PARSER.parseFrom(data, extensionRegistry);
564   }
565 
parseFrom(java.io.InputStream input)566   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(java.io.InputStream input)
567       throws java.io.IOException {
568     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
569   }
570 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)571   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(
572       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
573       throws java.io.IOException {
574     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
575         PARSER, input, extensionRegistry);
576   }
577 
parseDelimitedFrom(java.io.InputStream input)578   public static com.google.cloud.asset.v1p2beta1.Feed parseDelimitedFrom(java.io.InputStream input)
579       throws java.io.IOException {
580     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
581   }
582 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)583   public static com.google.cloud.asset.v1p2beta1.Feed parseDelimitedFrom(
584       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
585       throws java.io.IOException {
586     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
587         PARSER, input, extensionRegistry);
588   }
589 
parseFrom( com.google.protobuf.CodedInputStream input)590   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(
591       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
592     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
593   }
594 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)595   public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(
596       com.google.protobuf.CodedInputStream input,
597       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
598       throws java.io.IOException {
599     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
600         PARSER, input, extensionRegistry);
601   }
602 
603   @java.lang.Override
newBuilderForType()604   public Builder newBuilderForType() {
605     return newBuilder();
606   }
607 
newBuilder()608   public static Builder newBuilder() {
609     return DEFAULT_INSTANCE.toBuilder();
610   }
611 
newBuilder(com.google.cloud.asset.v1p2beta1.Feed prototype)612   public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.Feed prototype) {
613     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
614   }
615 
616   @java.lang.Override
toBuilder()617   public Builder toBuilder() {
618     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
619   }
620 
621   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)622   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
623     Builder builder = new Builder(parent);
624     return builder;
625   }
626   /**
627    *
628    *
629    * <pre>
630    * An asset feed used to export asset updates to a destinations.
631    * An asset feed filter controls what updates are exported.
632    * The asset feed must be created within a project, organization, or
633    * folder. Supported destinations are:
634    * Cloud Pub/Sub topics.
635    * </pre>
636    *
637    * Protobuf type {@code google.cloud.asset.v1p2beta1.Feed}
638    */
639   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
640       implements
641       // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.Feed)
642       com.google.cloud.asset.v1p2beta1.FeedOrBuilder {
getDescriptor()643     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
644       return com.google.cloud.asset.v1p2beta1.AssetServiceProto
645           .internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor;
646     }
647 
648     @java.lang.Override
649     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()650         internalGetFieldAccessorTable() {
651       return com.google.cloud.asset.v1p2beta1.AssetServiceProto
652           .internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable
653           .ensureFieldAccessorsInitialized(
654               com.google.cloud.asset.v1p2beta1.Feed.class,
655               com.google.cloud.asset.v1p2beta1.Feed.Builder.class);
656     }
657 
658     // Construct using com.google.cloud.asset.v1p2beta1.Feed.newBuilder()
Builder()659     private Builder() {}
660 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)661     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
662       super(parent);
663     }
664 
665     @java.lang.Override
clear()666     public Builder clear() {
667       super.clear();
668       bitField0_ = 0;
669       name_ = "";
670       assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
671       bitField0_ = (bitField0_ & ~0x00000002);
672       assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
673       bitField0_ = (bitField0_ & ~0x00000004);
674       contentType_ = 0;
675       feedOutputConfig_ = null;
676       if (feedOutputConfigBuilder_ != null) {
677         feedOutputConfigBuilder_.dispose();
678         feedOutputConfigBuilder_ = null;
679       }
680       return this;
681     }
682 
683     @java.lang.Override
getDescriptorForType()684     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
685       return com.google.cloud.asset.v1p2beta1.AssetServiceProto
686           .internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor;
687     }
688 
689     @java.lang.Override
getDefaultInstanceForType()690     public com.google.cloud.asset.v1p2beta1.Feed getDefaultInstanceForType() {
691       return com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance();
692     }
693 
694     @java.lang.Override
build()695     public com.google.cloud.asset.v1p2beta1.Feed build() {
696       com.google.cloud.asset.v1p2beta1.Feed result = buildPartial();
697       if (!result.isInitialized()) {
698         throw newUninitializedMessageException(result);
699       }
700       return result;
701     }
702 
703     @java.lang.Override
buildPartial()704     public com.google.cloud.asset.v1p2beta1.Feed buildPartial() {
705       com.google.cloud.asset.v1p2beta1.Feed result =
706           new com.google.cloud.asset.v1p2beta1.Feed(this);
707       buildPartialRepeatedFields(result);
708       if (bitField0_ != 0) {
709         buildPartial0(result);
710       }
711       onBuilt();
712       return result;
713     }
714 
buildPartialRepeatedFields(com.google.cloud.asset.v1p2beta1.Feed result)715     private void buildPartialRepeatedFields(com.google.cloud.asset.v1p2beta1.Feed result) {
716       if (((bitField0_ & 0x00000002) != 0)) {
717         assetNames_ = assetNames_.getUnmodifiableView();
718         bitField0_ = (bitField0_ & ~0x00000002);
719       }
720       result.assetNames_ = assetNames_;
721       if (((bitField0_ & 0x00000004) != 0)) {
722         assetTypes_ = assetTypes_.getUnmodifiableView();
723         bitField0_ = (bitField0_ & ~0x00000004);
724       }
725       result.assetTypes_ = assetTypes_;
726     }
727 
buildPartial0(com.google.cloud.asset.v1p2beta1.Feed result)728     private void buildPartial0(com.google.cloud.asset.v1p2beta1.Feed result) {
729       int from_bitField0_ = bitField0_;
730       if (((from_bitField0_ & 0x00000001) != 0)) {
731         result.name_ = name_;
732       }
733       if (((from_bitField0_ & 0x00000008) != 0)) {
734         result.contentType_ = contentType_;
735       }
736       if (((from_bitField0_ & 0x00000010) != 0)) {
737         result.feedOutputConfig_ =
738             feedOutputConfigBuilder_ == null ? feedOutputConfig_ : feedOutputConfigBuilder_.build();
739       }
740     }
741 
742     @java.lang.Override
clone()743     public Builder clone() {
744       return super.clone();
745     }
746 
747     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)748     public Builder setField(
749         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
750       return super.setField(field, value);
751     }
752 
753     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)754     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
755       return super.clearField(field);
756     }
757 
758     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)759     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
760       return super.clearOneof(oneof);
761     }
762 
763     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)764     public Builder setRepeatedField(
765         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
766       return super.setRepeatedField(field, index, value);
767     }
768 
769     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)770     public Builder addRepeatedField(
771         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
772       return super.addRepeatedField(field, value);
773     }
774 
775     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)776     public Builder mergeFrom(com.google.protobuf.Message other) {
777       if (other instanceof com.google.cloud.asset.v1p2beta1.Feed) {
778         return mergeFrom((com.google.cloud.asset.v1p2beta1.Feed) other);
779       } else {
780         super.mergeFrom(other);
781         return this;
782       }
783     }
784 
mergeFrom(com.google.cloud.asset.v1p2beta1.Feed other)785     public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Feed other) {
786       if (other == com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance()) return this;
787       if (!other.getName().isEmpty()) {
788         name_ = other.name_;
789         bitField0_ |= 0x00000001;
790         onChanged();
791       }
792       if (!other.assetNames_.isEmpty()) {
793         if (assetNames_.isEmpty()) {
794           assetNames_ = other.assetNames_;
795           bitField0_ = (bitField0_ & ~0x00000002);
796         } else {
797           ensureAssetNamesIsMutable();
798           assetNames_.addAll(other.assetNames_);
799         }
800         onChanged();
801       }
802       if (!other.assetTypes_.isEmpty()) {
803         if (assetTypes_.isEmpty()) {
804           assetTypes_ = other.assetTypes_;
805           bitField0_ = (bitField0_ & ~0x00000004);
806         } else {
807           ensureAssetTypesIsMutable();
808           assetTypes_.addAll(other.assetTypes_);
809         }
810         onChanged();
811       }
812       if (other.contentType_ != 0) {
813         setContentTypeValue(other.getContentTypeValue());
814       }
815       if (other.hasFeedOutputConfig()) {
816         mergeFeedOutputConfig(other.getFeedOutputConfig());
817       }
818       this.mergeUnknownFields(other.getUnknownFields());
819       onChanged();
820       return this;
821     }
822 
823     @java.lang.Override
isInitialized()824     public final boolean isInitialized() {
825       return true;
826     }
827 
828     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)829     public Builder mergeFrom(
830         com.google.protobuf.CodedInputStream input,
831         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
832         throws java.io.IOException {
833       if (extensionRegistry == null) {
834         throw new java.lang.NullPointerException();
835       }
836       try {
837         boolean done = false;
838         while (!done) {
839           int tag = input.readTag();
840           switch (tag) {
841             case 0:
842               done = true;
843               break;
844             case 10:
845               {
846                 name_ = input.readStringRequireUtf8();
847                 bitField0_ |= 0x00000001;
848                 break;
849               } // case 10
850             case 18:
851               {
852                 java.lang.String s = input.readStringRequireUtf8();
853                 ensureAssetNamesIsMutable();
854                 assetNames_.add(s);
855                 break;
856               } // case 18
857             case 26:
858               {
859                 java.lang.String s = input.readStringRequireUtf8();
860                 ensureAssetTypesIsMutable();
861                 assetTypes_.add(s);
862                 break;
863               } // case 26
864             case 32:
865               {
866                 contentType_ = input.readEnum();
867                 bitField0_ |= 0x00000008;
868                 break;
869               } // case 32
870             case 42:
871               {
872                 input.readMessage(
873                     getFeedOutputConfigFieldBuilder().getBuilder(), extensionRegistry);
874                 bitField0_ |= 0x00000010;
875                 break;
876               } // case 42
877             default:
878               {
879                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
880                   done = true; // was an endgroup tag
881                 }
882                 break;
883               } // default:
884           } // switch (tag)
885         } // while (!done)
886       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
887         throw e.unwrapIOException();
888       } finally {
889         onChanged();
890       } // finally
891       return this;
892     }
893 
894     private int bitField0_;
895 
896     private java.lang.Object name_ = "";
897     /**
898      *
899      *
900      * <pre>
901      * Required. The format will be
902      * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
903      * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
904      * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
905      * The client-assigned feed identifier must be unique within the parent
906      * project/folder/organization.
907      * </pre>
908      *
909      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
910      *
911      * @return The name.
912      */
getName()913     public java.lang.String getName() {
914       java.lang.Object ref = name_;
915       if (!(ref instanceof java.lang.String)) {
916         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
917         java.lang.String s = bs.toStringUtf8();
918         name_ = s;
919         return s;
920       } else {
921         return (java.lang.String) ref;
922       }
923     }
924     /**
925      *
926      *
927      * <pre>
928      * Required. The format will be
929      * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
930      * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
931      * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
932      * The client-assigned feed identifier must be unique within the parent
933      * project/folder/organization.
934      * </pre>
935      *
936      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
937      *
938      * @return The bytes for name.
939      */
getNameBytes()940     public com.google.protobuf.ByteString getNameBytes() {
941       java.lang.Object ref = name_;
942       if (ref instanceof String) {
943         com.google.protobuf.ByteString b =
944             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
945         name_ = b;
946         return b;
947       } else {
948         return (com.google.protobuf.ByteString) ref;
949       }
950     }
951     /**
952      *
953      *
954      * <pre>
955      * Required. The format will be
956      * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
957      * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
958      * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
959      * The client-assigned feed identifier must be unique within the parent
960      * project/folder/organization.
961      * </pre>
962      *
963      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
964      *
965      * @param value The name to set.
966      * @return This builder for chaining.
967      */
setName(java.lang.String value)968     public Builder setName(java.lang.String value) {
969       if (value == null) {
970         throw new NullPointerException();
971       }
972       name_ = value;
973       bitField0_ |= 0x00000001;
974       onChanged();
975       return this;
976     }
977     /**
978      *
979      *
980      * <pre>
981      * Required. The format will be
982      * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
983      * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
984      * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
985      * The client-assigned feed identifier must be unique within the parent
986      * project/folder/organization.
987      * </pre>
988      *
989      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
990      *
991      * @return This builder for chaining.
992      */
clearName()993     public Builder clearName() {
994       name_ = getDefaultInstance().getName();
995       bitField0_ = (bitField0_ & ~0x00000001);
996       onChanged();
997       return this;
998     }
999     /**
1000      *
1001      *
1002      * <pre>
1003      * Required. The format will be
1004      * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
1005      * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
1006      * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
1007      * The client-assigned feed identifier must be unique within the parent
1008      * project/folder/organization.
1009      * </pre>
1010      *
1011      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
1012      *
1013      * @param value The bytes for name to set.
1014      * @return This builder for chaining.
1015      */
setNameBytes(com.google.protobuf.ByteString value)1016     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1017       if (value == null) {
1018         throw new NullPointerException();
1019       }
1020       checkByteStringIsUtf8(value);
1021       name_ = value;
1022       bitField0_ |= 0x00000001;
1023       onChanged();
1024       return this;
1025     }
1026 
1027     private com.google.protobuf.LazyStringList assetNames_ =
1028         com.google.protobuf.LazyStringArrayList.EMPTY;
1029 
ensureAssetNamesIsMutable()1030     private void ensureAssetNamesIsMutable() {
1031       if (!((bitField0_ & 0x00000002) != 0)) {
1032         assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_);
1033         bitField0_ |= 0x00000002;
1034       }
1035     }
1036     /**
1037      *
1038      *
1039      * <pre>
1040      * A list of the full names of the assets to receive updates. You must specify
1041      * either or both of asset_names and asset_types. Only asset updates matching
1042      * specified asset_names and asset_types are exported to the feed. For
1043      * example:
1044      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1045      * See [Resource
1046      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1047      * for more info.
1048      * </pre>
1049      *
1050      * <code>repeated string asset_names = 2;</code>
1051      *
1052      * @return A list containing the assetNames.
1053      */
getAssetNamesList()1054     public com.google.protobuf.ProtocolStringList getAssetNamesList() {
1055       return assetNames_.getUnmodifiableView();
1056     }
1057     /**
1058      *
1059      *
1060      * <pre>
1061      * A list of the full names of the assets to receive updates. You must specify
1062      * either or both of asset_names and asset_types. Only asset updates matching
1063      * specified asset_names and asset_types are exported to the feed. For
1064      * example:
1065      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1066      * See [Resource
1067      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1068      * for more info.
1069      * </pre>
1070      *
1071      * <code>repeated string asset_names = 2;</code>
1072      *
1073      * @return The count of assetNames.
1074      */
getAssetNamesCount()1075     public int getAssetNamesCount() {
1076       return assetNames_.size();
1077     }
1078     /**
1079      *
1080      *
1081      * <pre>
1082      * A list of the full names of the assets to receive updates. You must specify
1083      * either or both of asset_names and asset_types. Only asset updates matching
1084      * specified asset_names and asset_types are exported to the feed. For
1085      * example:
1086      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1087      * See [Resource
1088      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1089      * for more info.
1090      * </pre>
1091      *
1092      * <code>repeated string asset_names = 2;</code>
1093      *
1094      * @param index The index of the element to return.
1095      * @return The assetNames at the given index.
1096      */
getAssetNames(int index)1097     public java.lang.String getAssetNames(int index) {
1098       return assetNames_.get(index);
1099     }
1100     /**
1101      *
1102      *
1103      * <pre>
1104      * A list of the full names of the assets to receive updates. You must specify
1105      * either or both of asset_names and asset_types. Only asset updates matching
1106      * specified asset_names and asset_types are exported to the feed. For
1107      * example:
1108      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1109      * See [Resource
1110      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1111      * for more info.
1112      * </pre>
1113      *
1114      * <code>repeated string asset_names = 2;</code>
1115      *
1116      * @param index The index of the value to return.
1117      * @return The bytes of the assetNames at the given index.
1118      */
getAssetNamesBytes(int index)1119     public com.google.protobuf.ByteString getAssetNamesBytes(int index) {
1120       return assetNames_.getByteString(index);
1121     }
1122     /**
1123      *
1124      *
1125      * <pre>
1126      * A list of the full names of the assets to receive updates. You must specify
1127      * either or both of asset_names and asset_types. Only asset updates matching
1128      * specified asset_names and asset_types are exported to the feed. For
1129      * example:
1130      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1131      * See [Resource
1132      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1133      * for more info.
1134      * </pre>
1135      *
1136      * <code>repeated string asset_names = 2;</code>
1137      *
1138      * @param index The index to set the value at.
1139      * @param value The assetNames to set.
1140      * @return This builder for chaining.
1141      */
setAssetNames(int index, java.lang.String value)1142     public Builder setAssetNames(int index, java.lang.String value) {
1143       if (value == null) {
1144         throw new NullPointerException();
1145       }
1146       ensureAssetNamesIsMutable();
1147       assetNames_.set(index, value);
1148       onChanged();
1149       return this;
1150     }
1151     /**
1152      *
1153      *
1154      * <pre>
1155      * A list of the full names of the assets to receive updates. You must specify
1156      * either or both of asset_names and asset_types. Only asset updates matching
1157      * specified asset_names and asset_types are exported to the feed. For
1158      * example:
1159      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1160      * See [Resource
1161      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1162      * for more info.
1163      * </pre>
1164      *
1165      * <code>repeated string asset_names = 2;</code>
1166      *
1167      * @param value The assetNames to add.
1168      * @return This builder for chaining.
1169      */
addAssetNames(java.lang.String value)1170     public Builder addAssetNames(java.lang.String value) {
1171       if (value == null) {
1172         throw new NullPointerException();
1173       }
1174       ensureAssetNamesIsMutable();
1175       assetNames_.add(value);
1176       onChanged();
1177       return this;
1178     }
1179     /**
1180      *
1181      *
1182      * <pre>
1183      * A list of the full names of the assets to receive updates. You must specify
1184      * either or both of asset_names and asset_types. Only asset updates matching
1185      * specified asset_names and asset_types are exported to the feed. For
1186      * example:
1187      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1188      * See [Resource
1189      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1190      * for more info.
1191      * </pre>
1192      *
1193      * <code>repeated string asset_names = 2;</code>
1194      *
1195      * @param values The assetNames to add.
1196      * @return This builder for chaining.
1197      */
addAllAssetNames(java.lang.Iterable<java.lang.String> values)1198     public Builder addAllAssetNames(java.lang.Iterable<java.lang.String> values) {
1199       ensureAssetNamesIsMutable();
1200       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetNames_);
1201       onChanged();
1202       return this;
1203     }
1204     /**
1205      *
1206      *
1207      * <pre>
1208      * A list of the full names of the assets to receive updates. You must specify
1209      * either or both of asset_names and asset_types. Only asset updates matching
1210      * specified asset_names and asset_types are exported to the feed. For
1211      * example:
1212      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1213      * See [Resource
1214      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1215      * for more info.
1216      * </pre>
1217      *
1218      * <code>repeated string asset_names = 2;</code>
1219      *
1220      * @return This builder for chaining.
1221      */
clearAssetNames()1222     public Builder clearAssetNames() {
1223       assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1224       bitField0_ = (bitField0_ & ~0x00000002);
1225       onChanged();
1226       return this;
1227     }
1228     /**
1229      *
1230      *
1231      * <pre>
1232      * A list of the full names of the assets to receive updates. You must specify
1233      * either or both of asset_names and asset_types. Only asset updates matching
1234      * specified asset_names and asset_types are exported to the feed. For
1235      * example:
1236      * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
1237      * See [Resource
1238      * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
1239      * for more info.
1240      * </pre>
1241      *
1242      * <code>repeated string asset_names = 2;</code>
1243      *
1244      * @param value The bytes of the assetNames to add.
1245      * @return This builder for chaining.
1246      */
addAssetNamesBytes(com.google.protobuf.ByteString value)1247     public Builder addAssetNamesBytes(com.google.protobuf.ByteString value) {
1248       if (value == null) {
1249         throw new NullPointerException();
1250       }
1251       checkByteStringIsUtf8(value);
1252       ensureAssetNamesIsMutable();
1253       assetNames_.add(value);
1254       onChanged();
1255       return this;
1256     }
1257 
1258     private com.google.protobuf.LazyStringList assetTypes_ =
1259         com.google.protobuf.LazyStringArrayList.EMPTY;
1260 
ensureAssetTypesIsMutable()1261     private void ensureAssetTypesIsMutable() {
1262       if (!((bitField0_ & 0x00000004) != 0)) {
1263         assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_);
1264         bitField0_ |= 0x00000004;
1265       }
1266     }
1267     /**
1268      *
1269      *
1270      * <pre>
1271      * A list of types of the assets to receive updates. You must specify either
1272      * or both of asset_names and asset_types. Only asset updates matching
1273      * specified asset_names and asset_types are exported to the feed.
1274      * For example:
1275      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1276      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1277      * for all supported asset types.
1278      * </pre>
1279      *
1280      * <code>repeated string asset_types = 3;</code>
1281      *
1282      * @return A list containing the assetTypes.
1283      */
getAssetTypesList()1284     public com.google.protobuf.ProtocolStringList getAssetTypesList() {
1285       return assetTypes_.getUnmodifiableView();
1286     }
1287     /**
1288      *
1289      *
1290      * <pre>
1291      * A list of types of the assets to receive updates. You must specify either
1292      * or both of asset_names and asset_types. Only asset updates matching
1293      * specified asset_names and asset_types are exported to the feed.
1294      * For example:
1295      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1296      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1297      * for all supported asset types.
1298      * </pre>
1299      *
1300      * <code>repeated string asset_types = 3;</code>
1301      *
1302      * @return The count of assetTypes.
1303      */
getAssetTypesCount()1304     public int getAssetTypesCount() {
1305       return assetTypes_.size();
1306     }
1307     /**
1308      *
1309      *
1310      * <pre>
1311      * A list of types of the assets to receive updates. You must specify either
1312      * or both of asset_names and asset_types. Only asset updates matching
1313      * specified asset_names and asset_types are exported to the feed.
1314      * For example:
1315      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1316      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1317      * for all supported asset types.
1318      * </pre>
1319      *
1320      * <code>repeated string asset_types = 3;</code>
1321      *
1322      * @param index The index of the element to return.
1323      * @return The assetTypes at the given index.
1324      */
getAssetTypes(int index)1325     public java.lang.String getAssetTypes(int index) {
1326       return assetTypes_.get(index);
1327     }
1328     /**
1329      *
1330      *
1331      * <pre>
1332      * A list of types of the assets to receive updates. You must specify either
1333      * or both of asset_names and asset_types. Only asset updates matching
1334      * specified asset_names and asset_types are exported to the feed.
1335      * For example:
1336      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1337      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1338      * for all supported asset types.
1339      * </pre>
1340      *
1341      * <code>repeated string asset_types = 3;</code>
1342      *
1343      * @param index The index of the value to return.
1344      * @return The bytes of the assetTypes at the given index.
1345      */
getAssetTypesBytes(int index)1346     public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
1347       return assetTypes_.getByteString(index);
1348     }
1349     /**
1350      *
1351      *
1352      * <pre>
1353      * A list of types of the assets to receive updates. You must specify either
1354      * or both of asset_names and asset_types. Only asset updates matching
1355      * specified asset_names and asset_types are exported to the feed.
1356      * For example:
1357      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1358      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1359      * for all supported asset types.
1360      * </pre>
1361      *
1362      * <code>repeated string asset_types = 3;</code>
1363      *
1364      * @param index The index to set the value at.
1365      * @param value The assetTypes to set.
1366      * @return This builder for chaining.
1367      */
setAssetTypes(int index, java.lang.String value)1368     public Builder setAssetTypes(int index, java.lang.String value) {
1369       if (value == null) {
1370         throw new NullPointerException();
1371       }
1372       ensureAssetTypesIsMutable();
1373       assetTypes_.set(index, value);
1374       onChanged();
1375       return this;
1376     }
1377     /**
1378      *
1379      *
1380      * <pre>
1381      * A list of types of the assets to receive updates. You must specify either
1382      * or both of asset_names and asset_types. Only asset updates matching
1383      * specified asset_names and asset_types are exported to the feed.
1384      * For example:
1385      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1386      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1387      * for all supported asset types.
1388      * </pre>
1389      *
1390      * <code>repeated string asset_types = 3;</code>
1391      *
1392      * @param value The assetTypes to add.
1393      * @return This builder for chaining.
1394      */
addAssetTypes(java.lang.String value)1395     public Builder addAssetTypes(java.lang.String value) {
1396       if (value == null) {
1397         throw new NullPointerException();
1398       }
1399       ensureAssetTypesIsMutable();
1400       assetTypes_.add(value);
1401       onChanged();
1402       return this;
1403     }
1404     /**
1405      *
1406      *
1407      * <pre>
1408      * A list of types of the assets to receive updates. You must specify either
1409      * or both of asset_names and asset_types. Only asset updates matching
1410      * specified asset_names and asset_types are exported to the feed.
1411      * For example:
1412      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1413      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1414      * for all supported asset types.
1415      * </pre>
1416      *
1417      * <code>repeated string asset_types = 3;</code>
1418      *
1419      * @param values The assetTypes to add.
1420      * @return This builder for chaining.
1421      */
addAllAssetTypes(java.lang.Iterable<java.lang.String> values)1422     public Builder addAllAssetTypes(java.lang.Iterable<java.lang.String> values) {
1423       ensureAssetTypesIsMutable();
1424       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetTypes_);
1425       onChanged();
1426       return this;
1427     }
1428     /**
1429      *
1430      *
1431      * <pre>
1432      * A list of types of the assets to receive updates. You must specify either
1433      * or both of asset_names and asset_types. Only asset updates matching
1434      * specified asset_names and asset_types are exported to the feed.
1435      * For example:
1436      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1437      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1438      * for all supported asset types.
1439      * </pre>
1440      *
1441      * <code>repeated string asset_types = 3;</code>
1442      *
1443      * @return This builder for chaining.
1444      */
clearAssetTypes()1445     public Builder clearAssetTypes() {
1446       assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1447       bitField0_ = (bitField0_ & ~0x00000004);
1448       onChanged();
1449       return this;
1450     }
1451     /**
1452      *
1453      *
1454      * <pre>
1455      * A list of types of the assets to receive updates. You must specify either
1456      * or both of asset_names and asset_types. Only asset updates matching
1457      * specified asset_names and asset_types are exported to the feed.
1458      * For example:
1459      * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
1460      * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
1461      * for all supported asset types.
1462      * </pre>
1463      *
1464      * <code>repeated string asset_types = 3;</code>
1465      *
1466      * @param value The bytes of the assetTypes to add.
1467      * @return This builder for chaining.
1468      */
addAssetTypesBytes(com.google.protobuf.ByteString value)1469     public Builder addAssetTypesBytes(com.google.protobuf.ByteString value) {
1470       if (value == null) {
1471         throw new NullPointerException();
1472       }
1473       checkByteStringIsUtf8(value);
1474       ensureAssetTypesIsMutable();
1475       assetTypes_.add(value);
1476       onChanged();
1477       return this;
1478     }
1479 
1480     private int contentType_ = 0;
1481     /**
1482      *
1483      *
1484      * <pre>
1485      * Asset content type. If not specified, no content but the asset name and
1486      * type will be returned.
1487      * </pre>
1488      *
1489      * <code>.google.cloud.asset.v1p2beta1.ContentType content_type = 4;</code>
1490      *
1491      * @return The enum numeric value on the wire for contentType.
1492      */
1493     @java.lang.Override
getContentTypeValue()1494     public int getContentTypeValue() {
1495       return contentType_;
1496     }
1497     /**
1498      *
1499      *
1500      * <pre>
1501      * Asset content type. If not specified, no content but the asset name and
1502      * type will be returned.
1503      * </pre>
1504      *
1505      * <code>.google.cloud.asset.v1p2beta1.ContentType content_type = 4;</code>
1506      *
1507      * @param value The enum numeric value on the wire for contentType to set.
1508      * @return This builder for chaining.
1509      */
setContentTypeValue(int value)1510     public Builder setContentTypeValue(int value) {
1511       contentType_ = value;
1512       bitField0_ |= 0x00000008;
1513       onChanged();
1514       return this;
1515     }
1516     /**
1517      *
1518      *
1519      * <pre>
1520      * Asset content type. If not specified, no content but the asset name and
1521      * type will be returned.
1522      * </pre>
1523      *
1524      * <code>.google.cloud.asset.v1p2beta1.ContentType content_type = 4;</code>
1525      *
1526      * @return The contentType.
1527      */
1528     @java.lang.Override
getContentType()1529     public com.google.cloud.asset.v1p2beta1.ContentType getContentType() {
1530       com.google.cloud.asset.v1p2beta1.ContentType result =
1531           com.google.cloud.asset.v1p2beta1.ContentType.forNumber(contentType_);
1532       return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result;
1533     }
1534     /**
1535      *
1536      *
1537      * <pre>
1538      * Asset content type. If not specified, no content but the asset name and
1539      * type will be returned.
1540      * </pre>
1541      *
1542      * <code>.google.cloud.asset.v1p2beta1.ContentType content_type = 4;</code>
1543      *
1544      * @param value The contentType to set.
1545      * @return This builder for chaining.
1546      */
setContentType(com.google.cloud.asset.v1p2beta1.ContentType value)1547     public Builder setContentType(com.google.cloud.asset.v1p2beta1.ContentType value) {
1548       if (value == null) {
1549         throw new NullPointerException();
1550       }
1551       bitField0_ |= 0x00000008;
1552       contentType_ = value.getNumber();
1553       onChanged();
1554       return this;
1555     }
1556     /**
1557      *
1558      *
1559      * <pre>
1560      * Asset content type. If not specified, no content but the asset name and
1561      * type will be returned.
1562      * </pre>
1563      *
1564      * <code>.google.cloud.asset.v1p2beta1.ContentType content_type = 4;</code>
1565      *
1566      * @return This builder for chaining.
1567      */
clearContentType()1568     public Builder clearContentType() {
1569       bitField0_ = (bitField0_ & ~0x00000008);
1570       contentType_ = 0;
1571       onChanged();
1572       return this;
1573     }
1574 
1575     private com.google.cloud.asset.v1p2beta1.FeedOutputConfig feedOutputConfig_;
1576     private com.google.protobuf.SingleFieldBuilderV3<
1577             com.google.cloud.asset.v1p2beta1.FeedOutputConfig,
1578             com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder,
1579             com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder>
1580         feedOutputConfigBuilder_;
1581     /**
1582      *
1583      *
1584      * <pre>
1585      * Required. Feed output configuration defining where the asset updates are
1586      * published to.
1587      * </pre>
1588      *
1589      * <code>
1590      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1591      * </code>
1592      *
1593      * @return Whether the feedOutputConfig field is set.
1594      */
hasFeedOutputConfig()1595     public boolean hasFeedOutputConfig() {
1596       return ((bitField0_ & 0x00000010) != 0);
1597     }
1598     /**
1599      *
1600      *
1601      * <pre>
1602      * Required. Feed output configuration defining where the asset updates are
1603      * published to.
1604      * </pre>
1605      *
1606      * <code>
1607      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1608      * </code>
1609      *
1610      * @return The feedOutputConfig.
1611      */
getFeedOutputConfig()1612     public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig() {
1613       if (feedOutputConfigBuilder_ == null) {
1614         return feedOutputConfig_ == null
1615             ? com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance()
1616             : feedOutputConfig_;
1617       } else {
1618         return feedOutputConfigBuilder_.getMessage();
1619       }
1620     }
1621     /**
1622      *
1623      *
1624      * <pre>
1625      * Required. Feed output configuration defining where the asset updates are
1626      * published to.
1627      * </pre>
1628      *
1629      * <code>
1630      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1631      * </code>
1632      */
setFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value)1633     public Builder setFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value) {
1634       if (feedOutputConfigBuilder_ == null) {
1635         if (value == null) {
1636           throw new NullPointerException();
1637         }
1638         feedOutputConfig_ = value;
1639       } else {
1640         feedOutputConfigBuilder_.setMessage(value);
1641       }
1642       bitField0_ |= 0x00000010;
1643       onChanged();
1644       return this;
1645     }
1646     /**
1647      *
1648      *
1649      * <pre>
1650      * Required. Feed output configuration defining where the asset updates are
1651      * published to.
1652      * </pre>
1653      *
1654      * <code>
1655      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1656      * </code>
1657      */
setFeedOutputConfig( com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder builderForValue)1658     public Builder setFeedOutputConfig(
1659         com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder builderForValue) {
1660       if (feedOutputConfigBuilder_ == null) {
1661         feedOutputConfig_ = builderForValue.build();
1662       } else {
1663         feedOutputConfigBuilder_.setMessage(builderForValue.build());
1664       }
1665       bitField0_ |= 0x00000010;
1666       onChanged();
1667       return this;
1668     }
1669     /**
1670      *
1671      *
1672      * <pre>
1673      * Required. Feed output configuration defining where the asset updates are
1674      * published to.
1675      * </pre>
1676      *
1677      * <code>
1678      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1679      * </code>
1680      */
mergeFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value)1681     public Builder mergeFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value) {
1682       if (feedOutputConfigBuilder_ == null) {
1683         if (((bitField0_ & 0x00000010) != 0)
1684             && feedOutputConfig_ != null
1685             && feedOutputConfig_
1686                 != com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance()) {
1687           getFeedOutputConfigBuilder().mergeFrom(value);
1688         } else {
1689           feedOutputConfig_ = value;
1690         }
1691       } else {
1692         feedOutputConfigBuilder_.mergeFrom(value);
1693       }
1694       bitField0_ |= 0x00000010;
1695       onChanged();
1696       return this;
1697     }
1698     /**
1699      *
1700      *
1701      * <pre>
1702      * Required. Feed output configuration defining where the asset updates are
1703      * published to.
1704      * </pre>
1705      *
1706      * <code>
1707      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1708      * </code>
1709      */
clearFeedOutputConfig()1710     public Builder clearFeedOutputConfig() {
1711       bitField0_ = (bitField0_ & ~0x00000010);
1712       feedOutputConfig_ = null;
1713       if (feedOutputConfigBuilder_ != null) {
1714         feedOutputConfigBuilder_.dispose();
1715         feedOutputConfigBuilder_ = null;
1716       }
1717       onChanged();
1718       return this;
1719     }
1720     /**
1721      *
1722      *
1723      * <pre>
1724      * Required. Feed output configuration defining where the asset updates are
1725      * published to.
1726      * </pre>
1727      *
1728      * <code>
1729      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1730      * </code>
1731      */
getFeedOutputConfigBuilder()1732     public com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder getFeedOutputConfigBuilder() {
1733       bitField0_ |= 0x00000010;
1734       onChanged();
1735       return getFeedOutputConfigFieldBuilder().getBuilder();
1736     }
1737     /**
1738      *
1739      *
1740      * <pre>
1741      * Required. Feed output configuration defining where the asset updates are
1742      * published to.
1743      * </pre>
1744      *
1745      * <code>
1746      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1747      * </code>
1748      */
1749     public com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder
getFeedOutputConfigOrBuilder()1750         getFeedOutputConfigOrBuilder() {
1751       if (feedOutputConfigBuilder_ != null) {
1752         return feedOutputConfigBuilder_.getMessageOrBuilder();
1753       } else {
1754         return feedOutputConfig_ == null
1755             ? com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance()
1756             : feedOutputConfig_;
1757       }
1758     }
1759     /**
1760      *
1761      *
1762      * <pre>
1763      * Required. Feed output configuration defining where the asset updates are
1764      * published to.
1765      * </pre>
1766      *
1767      * <code>
1768      * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED];
1769      * </code>
1770      */
1771     private com.google.protobuf.SingleFieldBuilderV3<
1772             com.google.cloud.asset.v1p2beta1.FeedOutputConfig,
1773             com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder,
1774             com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder>
getFeedOutputConfigFieldBuilder()1775         getFeedOutputConfigFieldBuilder() {
1776       if (feedOutputConfigBuilder_ == null) {
1777         feedOutputConfigBuilder_ =
1778             new com.google.protobuf.SingleFieldBuilderV3<
1779                 com.google.cloud.asset.v1p2beta1.FeedOutputConfig,
1780                 com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder,
1781                 com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder>(
1782                 getFeedOutputConfig(), getParentForChildren(), isClean());
1783         feedOutputConfig_ = null;
1784       }
1785       return feedOutputConfigBuilder_;
1786     }
1787 
1788     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1789     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1790       return super.setUnknownFields(unknownFields);
1791     }
1792 
1793     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1794     public final Builder mergeUnknownFields(
1795         final com.google.protobuf.UnknownFieldSet unknownFields) {
1796       return super.mergeUnknownFields(unknownFields);
1797     }
1798 
1799     // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.Feed)
1800   }
1801 
1802   // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Feed)
1803   private static final com.google.cloud.asset.v1p2beta1.Feed DEFAULT_INSTANCE;
1804 
1805   static {
1806     DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.Feed();
1807   }
1808 
getDefaultInstance()1809   public static com.google.cloud.asset.v1p2beta1.Feed getDefaultInstance() {
1810     return DEFAULT_INSTANCE;
1811   }
1812 
1813   private static final com.google.protobuf.Parser<Feed> PARSER =
1814       new com.google.protobuf.AbstractParser<Feed>() {
1815         @java.lang.Override
1816         public Feed parsePartialFrom(
1817             com.google.protobuf.CodedInputStream input,
1818             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1819             throws com.google.protobuf.InvalidProtocolBufferException {
1820           Builder builder = newBuilder();
1821           try {
1822             builder.mergeFrom(input, extensionRegistry);
1823           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1824             throw e.setUnfinishedMessage(builder.buildPartial());
1825           } catch (com.google.protobuf.UninitializedMessageException e) {
1826             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1827           } catch (java.io.IOException e) {
1828             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1829                 .setUnfinishedMessage(builder.buildPartial());
1830           }
1831           return builder.buildPartial();
1832         }
1833       };
1834 
parser()1835   public static com.google.protobuf.Parser<Feed> parser() {
1836     return PARSER;
1837   }
1838 
1839   @java.lang.Override
getParserForType()1840   public com.google.protobuf.Parser<Feed> getParserForType() {
1841     return PARSER;
1842   }
1843 
1844   @java.lang.Override
getDefaultInstanceForType()1845   public com.google.cloud.asset.v1p2beta1.Feed getDefaultInstanceForType() {
1846     return DEFAULT_INSTANCE;
1847   }
1848 }
1849