Skip to content

Commit b2c7dfd

Browse files
feat: Adding uris to indicator of compromise (IOC) field (#900)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 468598080 Source-Link: googleapis/googleapis@07c3f50 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dd0b32a189a9b15a794602ee5f7c7c48600f6e4a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGQwYjMyYTE4OWE5YjE1YTc5NDYwMmVlNWY3YzdjNDg2MDBmNmU0YSJ9
1 parent 6cf0475 commit b2c7dfd

File tree

7 files changed

+413
-32
lines changed

7 files changed

+413
-32
lines changed

java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Indicator.java

+276
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private Indicator() {
4444
ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4545
domains_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4646
signatures_ = java.util.Collections.emptyList();
47+
uris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4748
}
4849

4950
@java.lang.Override
@@ -110,6 +111,16 @@ private Indicator(
110111
extensionRegistry));
111112
break;
112113
}
114+
case 34:
115+
{
116+
java.lang.String s = input.readStringRequireUtf8();
117+
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
118+
uris_ = new com.google.protobuf.LazyStringArrayList();
119+
mutable_bitField0_ |= 0x00000008;
120+
}
121+
uris_.add(s);
122+
break;
123+
}
113124
default:
114125
{
115126
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -135,6 +146,9 @@ private Indicator(
135146
if (((mutable_bitField0_ & 0x00000004) != 0)) {
136147
signatures_ = java.util.Collections.unmodifiableList(signatures_);
137148
}
149+
if (((mutable_bitField0_ & 0x00000008) != 0)) {
150+
uris_ = uris_.getUnmodifiableView();
151+
}
138152
this.unknownFields = unknownFields.build();
139153
makeExtensionsImmutable();
140154
}
@@ -4713,6 +4727,67 @@ public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getSignatur
47134727
return signatures_.get(index);
47144728
}
47154729

4730+
public static final int URIS_FIELD_NUMBER = 4;
4731+
private com.google.protobuf.LazyStringList uris_;
4732+
/**
4733+
*
4734+
*
4735+
* <pre>
4736+
* The list of URIs associated to the Findings.
4737+
* </pre>
4738+
*
4739+
* <code>repeated string uris = 4;</code>
4740+
*
4741+
* @return A list containing the uris.
4742+
*/
4743+
public com.google.protobuf.ProtocolStringList getUrisList() {
4744+
return uris_;
4745+
}
4746+
/**
4747+
*
4748+
*
4749+
* <pre>
4750+
* The list of URIs associated to the Findings.
4751+
* </pre>
4752+
*
4753+
* <code>repeated string uris = 4;</code>
4754+
*
4755+
* @return The count of uris.
4756+
*/
4757+
public int getUrisCount() {
4758+
return uris_.size();
4759+
}
4760+
/**
4761+
*
4762+
*
4763+
* <pre>
4764+
* The list of URIs associated to the Findings.
4765+
* </pre>
4766+
*
4767+
* <code>repeated string uris = 4;</code>
4768+
*
4769+
* @param index The index of the element to return.
4770+
* @return The uris at the given index.
4771+
*/
4772+
public java.lang.String getUris(int index) {
4773+
return uris_.get(index);
4774+
}
4775+
/**
4776+
*
4777+
*
4778+
* <pre>
4779+
* The list of URIs associated to the Findings.
4780+
* </pre>
4781+
*
4782+
* <code>repeated string uris = 4;</code>
4783+
*
4784+
* @param index The index of the value to return.
4785+
* @return The bytes of the uris at the given index.
4786+
*/
4787+
public com.google.protobuf.ByteString getUrisBytes(int index) {
4788+
return uris_.getByteString(index);
4789+
}
4790+
47164791
private byte memoizedIsInitialized = -1;
47174792

47184793
@java.lang.Override
@@ -4736,6 +4811,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
47364811
for (int i = 0; i < signatures_.size(); i++) {
47374812
output.writeMessage(3, signatures_.get(i));
47384813
}
4814+
for (int i = 0; i < uris_.size(); i++) {
4815+
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uris_.getRaw(i));
4816+
}
47394817
unknownFields.writeTo(output);
47404818
}
47414819

@@ -4764,6 +4842,14 @@ public int getSerializedSize() {
47644842
for (int i = 0; i < signatures_.size(); i++) {
47654843
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, signatures_.get(i));
47664844
}
4845+
{
4846+
int dataSize = 0;
4847+
for (int i = 0; i < uris_.size(); i++) {
4848+
dataSize += computeStringSizeNoTag(uris_.getRaw(i));
4849+
}
4850+
size += dataSize;
4851+
size += 1 * getUrisList().size();
4852+
}
47674853
size += unknownFields.getSerializedSize();
47684854
memoizedSize = size;
47694855
return size;
@@ -4783,6 +4869,7 @@ public boolean equals(final java.lang.Object obj) {
47834869
if (!getIpAddressesList().equals(other.getIpAddressesList())) return false;
47844870
if (!getDomainsList().equals(other.getDomainsList())) return false;
47854871
if (!getSignaturesList().equals(other.getSignaturesList())) return false;
4872+
if (!getUrisList().equals(other.getUrisList())) return false;
47864873
if (!unknownFields.equals(other.unknownFields)) return false;
47874874
return true;
47884875
}
@@ -4806,6 +4893,10 @@ public int hashCode() {
48064893
hash = (37 * hash) + SIGNATURES_FIELD_NUMBER;
48074894
hash = (53 * hash) + getSignaturesList().hashCode();
48084895
}
4896+
if (getUrisCount() > 0) {
4897+
hash = (37 * hash) + URIS_FIELD_NUMBER;
4898+
hash = (53 * hash) + getUrisList().hashCode();
4899+
}
48094900
hash = (29 * hash) + unknownFields.hashCode();
48104901
memoizedHashCode = hash;
48114902
return hash;
@@ -4966,6 +5057,8 @@ public Builder clear() {
49665057
} else {
49675058
signaturesBuilder_.clear();
49685059
}
5060+
uris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
5061+
bitField0_ = (bitField0_ & ~0x00000008);
49695062
return this;
49705063
}
49715064

@@ -5013,6 +5106,11 @@ public com.google.cloud.securitycenter.v1.Indicator buildPartial() {
50135106
} else {
50145107
result.signatures_ = signaturesBuilder_.build();
50155108
}
5109+
if (((bitField0_ & 0x00000008) != 0)) {
5110+
uris_ = uris_.getUnmodifiableView();
5111+
bitField0_ = (bitField0_ & ~0x00000008);
5112+
}
5113+
result.uris_ = uris_;
50165114
onBuilt();
50175115
return result;
50185116
}
@@ -5109,6 +5207,16 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Indicator other) {
51095207
}
51105208
}
51115209
}
5210+
if (!other.uris_.isEmpty()) {
5211+
if (uris_.isEmpty()) {
5212+
uris_ = other.uris_;
5213+
bitField0_ = (bitField0_ & ~0x00000008);
5214+
} else {
5215+
ensureUrisIsMutable();
5216+
uris_.addAll(other.uris_);
5217+
}
5218+
onChanged();
5219+
}
51125220
this.mergeUnknownFields(other.unknownFields);
51135221
onChanged();
51145222
return this;
@@ -5879,6 +5987,174 @@ public Builder removeSignatures(int index) {
58795987
return signaturesBuilder_;
58805988
}
58815989

5990+
private com.google.protobuf.LazyStringList uris_ =
5991+
com.google.protobuf.LazyStringArrayList.EMPTY;
5992+
5993+
private void ensureUrisIsMutable() {
5994+
if (!((bitField0_ & 0x00000008) != 0)) {
5995+
uris_ = new com.google.protobuf.LazyStringArrayList(uris_);
5996+
bitField0_ |= 0x00000008;
5997+
}
5998+
}
5999+
/**
6000+
*
6001+
*
6002+
* <pre>
6003+
* The list of URIs associated to the Findings.
6004+
* </pre>
6005+
*
6006+
* <code>repeated string uris = 4;</code>
6007+
*
6008+
* @return A list containing the uris.
6009+
*/
6010+
public com.google.protobuf.ProtocolStringList getUrisList() {
6011+
return uris_.getUnmodifiableView();
6012+
}
6013+
/**
6014+
*
6015+
*
6016+
* <pre>
6017+
* The list of URIs associated to the Findings.
6018+
* </pre>
6019+
*
6020+
* <code>repeated string uris = 4;</code>
6021+
*
6022+
* @return The count of uris.
6023+
*/
6024+
public int getUrisCount() {
6025+
return uris_.size();
6026+
}
6027+
/**
6028+
*
6029+
*
6030+
* <pre>
6031+
* The list of URIs associated to the Findings.
6032+
* </pre>
6033+
*
6034+
* <code>repeated string uris = 4;</code>
6035+
*
6036+
* @param index The index of the element to return.
6037+
* @return The uris at the given index.
6038+
*/
6039+
public java.lang.String getUris(int index) {
6040+
return uris_.get(index);
6041+
}
6042+
/**
6043+
*
6044+
*
6045+
* <pre>
6046+
* The list of URIs associated to the Findings.
6047+
* </pre>
6048+
*
6049+
* <code>repeated string uris = 4;</code>
6050+
*
6051+
* @param index The index of the value to return.
6052+
* @return The bytes of the uris at the given index.
6053+
*/
6054+
public com.google.protobuf.ByteString getUrisBytes(int index) {
6055+
return uris_.getByteString(index);
6056+
}
6057+
/**
6058+
*
6059+
*
6060+
* <pre>
6061+
* The list of URIs associated to the Findings.
6062+
* </pre>
6063+
*
6064+
* <code>repeated string uris = 4;</code>
6065+
*
6066+
* @param index The index to set the value at.
6067+
* @param value The uris to set.
6068+
* @return This builder for chaining.
6069+
*/
6070+
public Builder setUris(int index, java.lang.String value) {
6071+
if (value == null) {
6072+
throw new NullPointerException();
6073+
}
6074+
ensureUrisIsMutable();
6075+
uris_.set(index, value);
6076+
onChanged();
6077+
return this;
6078+
}
6079+
/**
6080+
*
6081+
*
6082+
* <pre>
6083+
* The list of URIs associated to the Findings.
6084+
* </pre>
6085+
*
6086+
* <code>repeated string uris = 4;</code>
6087+
*
6088+
* @param value The uris to add.
6089+
* @return This builder for chaining.
6090+
*/
6091+
public Builder addUris(java.lang.String value) {
6092+
if (value == null) {
6093+
throw new NullPointerException();
6094+
}
6095+
ensureUrisIsMutable();
6096+
uris_.add(value);
6097+
onChanged();
6098+
return this;
6099+
}
6100+
/**
6101+
*
6102+
*
6103+
* <pre>
6104+
* The list of URIs associated to the Findings.
6105+
* </pre>
6106+
*
6107+
* <code>repeated string uris = 4;</code>
6108+
*
6109+
* @param values The uris to add.
6110+
* @return This builder for chaining.
6111+
*/
6112+
public Builder addAllUris(java.lang.Iterable<java.lang.String> values) {
6113+
ensureUrisIsMutable();
6114+
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_);
6115+
onChanged();
6116+
return this;
6117+
}
6118+
/**
6119+
*
6120+
*
6121+
* <pre>
6122+
* The list of URIs associated to the Findings.
6123+
* </pre>
6124+
*
6125+
* <code>repeated string uris = 4;</code>
6126+
*
6127+
* @return This builder for chaining.
6128+
*/
6129+
public Builder clearUris() {
6130+
uris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
6131+
bitField0_ = (bitField0_ & ~0x00000008);
6132+
onChanged();
6133+
return this;
6134+
}
6135+
/**
6136+
*
6137+
*
6138+
* <pre>
6139+
* The list of URIs associated to the Findings.
6140+
* </pre>
6141+
*
6142+
* <code>repeated string uris = 4;</code>
6143+
*
6144+
* @param value The bytes of the uris to add.
6145+
* @return This builder for chaining.
6146+
*/
6147+
public Builder addUrisBytes(com.google.protobuf.ByteString value) {
6148+
if (value == null) {
6149+
throw new NullPointerException();
6150+
}
6151+
checkByteStringIsUtf8(value);
6152+
ensureUrisIsMutable();
6153+
uris_.add(value);
6154+
onChanged();
6155+
return this;
6156+
}
6157+
58826158
@java.lang.Override
58836159
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
58846160
return super.setUnknownFields(unknownFields);

0 commit comments

Comments
 (0)