Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 7fecc7e

Browse files
feat: added support OSInventory in Assets. docs: updated existing docs. (#460)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/a6c4a7d3-b64f-4f2e-b1a4-1d6ec5678ff7/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 342689216 Source-Link: googleapis/googleapis@1f8a514
1 parent 0df6426 commit 7fecc7e

File tree

10 files changed

+548
-160
lines changed

10 files changed

+548
-160
lines changed

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@
150150
<artifactId>proto-google-identity-accesscontextmanager-v1</artifactId>
151151
<version>1.0.7</version>
152152
</dependency>
153+
<dependency>
154+
<groupId>com.google.api.grpc</groupId>
155+
<artifactId>proto-google-cloud-os-config-v1</artifactId>
156+
<version>1.1.0</version>
157+
</dependency>
153158

154159
<dependency>
155160
<groupId>junit</groupId>

proto-google-cloud-asset-v1/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
<groupId>com.google.api.grpc</groupId>
4242
<artifactId>proto-google-identity-accesscontextmanager-v1</artifactId>
4343
</dependency>
44+
<dependency>
45+
<groupId>com.google.api.grpc</groupId>
46+
<artifactId>proto-google-cloud-os-config-v1</artifactId>
47+
</dependency>
4448
</dependencies>
4549

4650
<build>

proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java

Lines changed: 301 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,22 @@ private Asset(
223223
updateTime_ = subBuilder.buildPartial();
224224
}
225225

226+
break;
227+
}
228+
case 98:
229+
{
230+
com.google.cloud.osconfig.v1.Inventory.Builder subBuilder = null;
231+
if (osInventory_ != null) {
232+
subBuilder = osInventory_.toBuilder();
233+
}
234+
osInventory_ =
235+
input.readMessage(
236+
com.google.cloud.osconfig.v1.Inventory.parser(), extensionRegistry);
237+
if (subBuilder != null) {
238+
subBuilder.mergeFrom(osInventory_);
239+
osInventory_ = subBuilder.buildPartial();
240+
}
241+
226242
break;
227243
}
228244
default:
@@ -840,6 +856,60 @@ public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePe
840856
return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance();
841857
}
842858

859+
public static final int OS_INVENTORY_FIELD_NUMBER = 12;
860+
private com.google.cloud.osconfig.v1.Inventory osInventory_;
861+
/**
862+
*
863+
*
864+
* <pre>
865+
* A representation of runtime OS Inventory information. See [this
866+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
867+
* for more information.
868+
* </pre>
869+
*
870+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
871+
*
872+
* @return Whether the osInventory field is set.
873+
*/
874+
@java.lang.Override
875+
public boolean hasOsInventory() {
876+
return osInventory_ != null;
877+
}
878+
/**
879+
*
880+
*
881+
* <pre>
882+
* A representation of runtime OS Inventory information. See [this
883+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
884+
* for more information.
885+
* </pre>
886+
*
887+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
888+
*
889+
* @return The osInventory.
890+
*/
891+
@java.lang.Override
892+
public com.google.cloud.osconfig.v1.Inventory getOsInventory() {
893+
return osInventory_ == null
894+
? com.google.cloud.osconfig.v1.Inventory.getDefaultInstance()
895+
: osInventory_;
896+
}
897+
/**
898+
*
899+
*
900+
* <pre>
901+
* A representation of runtime OS Inventory information. See [this
902+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
903+
* for more information.
904+
* </pre>
905+
*
906+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
907+
*/
908+
@java.lang.Override
909+
public com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder() {
910+
return getOsInventory();
911+
}
912+
843913
public static final int ANCESTORS_FIELD_NUMBER = 10;
844914
private com.google.protobuf.LazyStringList ancestors_;
845915
/**
@@ -972,6 +1042,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
9721042
if (updateTime_ != null) {
9731043
output.writeMessage(11, getUpdateTime());
9741044
}
1045+
if (osInventory_ != null) {
1046+
output.writeMessage(12, getOsInventory());
1047+
}
9751048
unknownFields.writeTo(output);
9761049
}
9771050

@@ -1023,6 +1096,9 @@ public int getSerializedSize() {
10231096
if (updateTime_ != null) {
10241097
size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime());
10251098
}
1099+
if (osInventory_ != null) {
1100+
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getOsInventory());
1101+
}
10261102
size += unknownFields.getSerializedSize();
10271103
memoizedSize = size;
10281104
return size;
@@ -1053,6 +1129,10 @@ public boolean equals(final java.lang.Object obj) {
10531129
if (!getIamPolicy().equals(other.getIamPolicy())) return false;
10541130
}
10551131
if (!getOrgPolicyList().equals(other.getOrgPolicyList())) return false;
1132+
if (hasOsInventory() != other.hasOsInventory()) return false;
1133+
if (hasOsInventory()) {
1134+
if (!getOsInventory().equals(other.getOsInventory())) return false;
1135+
}
10561136
if (!getAncestorsList().equals(other.getAncestorsList())) return false;
10571137
if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false;
10581138
switch (accessContextPolicyCase_) {
@@ -1099,6 +1179,10 @@ public int hashCode() {
10991179
hash = (37 * hash) + ORG_POLICY_FIELD_NUMBER;
11001180
hash = (53 * hash) + getOrgPolicyList().hashCode();
11011181
}
1182+
if (hasOsInventory()) {
1183+
hash = (37 * hash) + OS_INVENTORY_FIELD_NUMBER;
1184+
hash = (53 * hash) + getOsInventory().hashCode();
1185+
}
11021186
if (getAncestorsCount() > 0) {
11031187
hash = (37 * hash) + ANCESTORS_FIELD_NUMBER;
11041188
hash = (53 * hash) + getAncestorsList().hashCode();
@@ -1299,6 +1383,12 @@ public Builder clear() {
12991383
} else {
13001384
orgPolicyBuilder_.clear();
13011385
}
1386+
if (osInventoryBuilder_ == null) {
1387+
osInventory_ = null;
1388+
} else {
1389+
osInventory_ = null;
1390+
osInventoryBuilder_ = null;
1391+
}
13021392
ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY;
13031393
bitField0_ = (bitField0_ & ~0x00000002);
13041394
accessContextPolicyCase_ = 0;
@@ -1377,6 +1467,11 @@ public com.google.cloud.asset.v1.Asset buildPartial() {
13771467
result.accessContextPolicy_ = servicePerimeterBuilder_.build();
13781468
}
13791469
}
1470+
if (osInventoryBuilder_ == null) {
1471+
result.osInventory_ = osInventory_;
1472+
} else {
1473+
result.osInventory_ = osInventoryBuilder_.build();
1474+
}
13801475
if (((bitField0_ & 0x00000002) != 0)) {
13811476
ancestors_ = ancestors_.getUnmodifiableView();
13821477
bitField0_ = (bitField0_ & ~0x00000002);
@@ -1476,6 +1571,9 @@ public Builder mergeFrom(com.google.cloud.asset.v1.Asset other) {
14761571
}
14771572
}
14781573
}
1574+
if (other.hasOsInventory()) {
1575+
mergeOsInventory(other.getOsInventory());
1576+
}
14791577
if (!other.ancestors_.isEmpty()) {
14801578
if (ancestors_.isEmpty()) {
14811579
ancestors_ = other.ancestors_;
@@ -3503,6 +3601,209 @@ public Builder clearServicePerimeter() {
35033601
return servicePerimeterBuilder_;
35043602
}
35053603

3604+
private com.google.cloud.osconfig.v1.Inventory osInventory_;
3605+
private com.google.protobuf.SingleFieldBuilderV3<
3606+
com.google.cloud.osconfig.v1.Inventory,
3607+
com.google.cloud.osconfig.v1.Inventory.Builder,
3608+
com.google.cloud.osconfig.v1.InventoryOrBuilder>
3609+
osInventoryBuilder_;
3610+
/**
3611+
*
3612+
*
3613+
* <pre>
3614+
* A representation of runtime OS Inventory information. See [this
3615+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3616+
* for more information.
3617+
* </pre>
3618+
*
3619+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3620+
*
3621+
* @return Whether the osInventory field is set.
3622+
*/
3623+
public boolean hasOsInventory() {
3624+
return osInventoryBuilder_ != null || osInventory_ != null;
3625+
}
3626+
/**
3627+
*
3628+
*
3629+
* <pre>
3630+
* A representation of runtime OS Inventory information. See [this
3631+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3632+
* for more information.
3633+
* </pre>
3634+
*
3635+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3636+
*
3637+
* @return The osInventory.
3638+
*/
3639+
public com.google.cloud.osconfig.v1.Inventory getOsInventory() {
3640+
if (osInventoryBuilder_ == null) {
3641+
return osInventory_ == null
3642+
? com.google.cloud.osconfig.v1.Inventory.getDefaultInstance()
3643+
: osInventory_;
3644+
} else {
3645+
return osInventoryBuilder_.getMessage();
3646+
}
3647+
}
3648+
/**
3649+
*
3650+
*
3651+
* <pre>
3652+
* A representation of runtime OS Inventory information. See [this
3653+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3654+
* for more information.
3655+
* </pre>
3656+
*
3657+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3658+
*/
3659+
public Builder setOsInventory(com.google.cloud.osconfig.v1.Inventory value) {
3660+
if (osInventoryBuilder_ == null) {
3661+
if (value == null) {
3662+
throw new NullPointerException();
3663+
}
3664+
osInventory_ = value;
3665+
onChanged();
3666+
} else {
3667+
osInventoryBuilder_.setMessage(value);
3668+
}
3669+
3670+
return this;
3671+
}
3672+
/**
3673+
*
3674+
*
3675+
* <pre>
3676+
* A representation of runtime OS Inventory information. See [this
3677+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3678+
* for more information.
3679+
* </pre>
3680+
*
3681+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3682+
*/
3683+
public Builder setOsInventory(com.google.cloud.osconfig.v1.Inventory.Builder builderForValue) {
3684+
if (osInventoryBuilder_ == null) {
3685+
osInventory_ = builderForValue.build();
3686+
onChanged();
3687+
} else {
3688+
osInventoryBuilder_.setMessage(builderForValue.build());
3689+
}
3690+
3691+
return this;
3692+
}
3693+
/**
3694+
*
3695+
*
3696+
* <pre>
3697+
* A representation of runtime OS Inventory information. See [this
3698+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3699+
* for more information.
3700+
* </pre>
3701+
*
3702+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3703+
*/
3704+
public Builder mergeOsInventory(com.google.cloud.osconfig.v1.Inventory value) {
3705+
if (osInventoryBuilder_ == null) {
3706+
if (osInventory_ != null) {
3707+
osInventory_ =
3708+
com.google.cloud.osconfig.v1.Inventory.newBuilder(osInventory_)
3709+
.mergeFrom(value)
3710+
.buildPartial();
3711+
} else {
3712+
osInventory_ = value;
3713+
}
3714+
onChanged();
3715+
} else {
3716+
osInventoryBuilder_.mergeFrom(value);
3717+
}
3718+
3719+
return this;
3720+
}
3721+
/**
3722+
*
3723+
*
3724+
* <pre>
3725+
* A representation of runtime OS Inventory information. See [this
3726+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3727+
* for more information.
3728+
* </pre>
3729+
*
3730+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3731+
*/
3732+
public Builder clearOsInventory() {
3733+
if (osInventoryBuilder_ == null) {
3734+
osInventory_ = null;
3735+
onChanged();
3736+
} else {
3737+
osInventory_ = null;
3738+
osInventoryBuilder_ = null;
3739+
}
3740+
3741+
return this;
3742+
}
3743+
/**
3744+
*
3745+
*
3746+
* <pre>
3747+
* A representation of runtime OS Inventory information. See [this
3748+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3749+
* for more information.
3750+
* </pre>
3751+
*
3752+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3753+
*/
3754+
public com.google.cloud.osconfig.v1.Inventory.Builder getOsInventoryBuilder() {
3755+
3756+
onChanged();
3757+
return getOsInventoryFieldBuilder().getBuilder();
3758+
}
3759+
/**
3760+
*
3761+
*
3762+
* <pre>
3763+
* A representation of runtime OS Inventory information. See [this
3764+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3765+
* for more information.
3766+
* </pre>
3767+
*
3768+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3769+
*/
3770+
public com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder() {
3771+
if (osInventoryBuilder_ != null) {
3772+
return osInventoryBuilder_.getMessageOrBuilder();
3773+
} else {
3774+
return osInventory_ == null
3775+
? com.google.cloud.osconfig.v1.Inventory.getDefaultInstance()
3776+
: osInventory_;
3777+
}
3778+
}
3779+
/**
3780+
*
3781+
*
3782+
* <pre>
3783+
* A representation of runtime OS Inventory information. See [this
3784+
* topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
3785+
* for more information.
3786+
* </pre>
3787+
*
3788+
* <code>.google.cloud.osconfig.v1.Inventory os_inventory = 12;</code>
3789+
*/
3790+
private com.google.protobuf.SingleFieldBuilderV3<
3791+
com.google.cloud.osconfig.v1.Inventory,
3792+
com.google.cloud.osconfig.v1.Inventory.Builder,
3793+
com.google.cloud.osconfig.v1.InventoryOrBuilder>
3794+
getOsInventoryFieldBuilder() {
3795+
if (osInventoryBuilder_ == null) {
3796+
osInventoryBuilder_ =
3797+
new com.google.protobuf.SingleFieldBuilderV3<
3798+
com.google.cloud.osconfig.v1.Inventory,
3799+
com.google.cloud.osconfig.v1.Inventory.Builder,
3800+
com.google.cloud.osconfig.v1.InventoryOrBuilder>(
3801+
getOsInventory(), getParentForChildren(), isClean());
3802+
osInventory_ = null;
3803+
}
3804+
return osInventoryBuilder_;
3805+
}
3806+
35063807
private com.google.protobuf.LazyStringList ancestors_ =
35073808
com.google.protobuf.LazyStringArrayList.EMPTY;
35083809

0 commit comments

Comments
 (0)