Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
47 changes: 4 additions & 43 deletions java-accessapproval/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,28 @@ Java idiomatic client for [Access Approval][product-docs].

## Quickstart

If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.1.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-accessapproval</artifactId>
</dependency>

```

If you are using Maven without BOM, add this to your dependencies:
If you are using Maven, add this to your pom.xml file:


```xml
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-accessapproval</artifactId>
<version>2.4.8</version>
<version>2.4.9</version>
</dependency>

```

If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.1.2')

implementation 'com.google.cloud:google-cloud-accessapproval'
```
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-accessapproval:2.4.8'
implementation 'com.google.cloud:google-cloud-accessapproval:2.4.9'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-accessapproval" % "2.4.8"
libraryDependencies += "com.google.cloud" % "google-cloud-accessapproval" % "2.4.9"
```

## Authentication
Expand Down Expand Up @@ -100,15 +70,6 @@ use this Access Approval Client Library.



## Samples

Samples are in the [`samples/`](https://github.com/googleapis/java-accessapproval/tree/main/samples) directory.

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Quickstart | [source code](https://github.com/googleapis/java-accessapproval/blob/main/samples/snippets/src/main/java/accessapproval/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-accessapproval&page=editor&open_in_editor=samples/snippets/src/main/java/accessapproval/Quickstart.java) |



## Troubleshooting

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}

private AccessApprovalServiceAccount(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();

name_ = s;
break;
}
case 18:
{
java.lang.String s = input.readStringRequireUtf8();

accountEmail_ = s;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.accessapproval.v1.AccessApprovalProto
.internal_static_google_cloud_accessapproval_v1_AccessApprovalServiceAccount_descriptor;
Expand Down Expand Up @@ -245,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountEmail_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accountEmail_);
}
unknownFields.writeTo(output);
getUnknownFields().writeTo(output);
}

@java.lang.Override
Expand All @@ -260,7 +207,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountEmail_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accountEmail_);
}
size += unknownFields.getSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
Expand All @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) {

if (!getName().equals(other.getName())) return false;
if (!getAccountEmail().equals(other.getAccountEmail())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}

Expand All @@ -293,7 +240,7 @@ public int hashCode() {
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + ACCOUNT_EMAIL_FIELD_NUMBER;
hash = (53 * hash) + getAccountEmail().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
Expand Down Expand Up @@ -423,17 +370,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}

// Construct using com.google.cloud.accessapproval.v1.AccessApprovalServiceAccount.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder() {}

private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}

private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}

@java.lang.Override
Expand Down Expand Up @@ -533,7 +473,7 @@ public Builder mergeFrom(
accountEmail_ = other.accountEmail_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
Expand All @@ -548,19 +488,43 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.accessapproval.v1.AccessApprovalServiceAccount parsedMessage = null;
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();

break;
} // case 10
case 18:
{
accountEmail_ = input.readStringRequireUtf8();

break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.accessapproval.v1.AccessApprovalServiceAccount)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
onChanged();
} // finally
return this;
}

Expand Down Expand Up @@ -825,7 +789,18 @@ public AccessApprovalServiceAccount parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AccessApprovalServiceAccount(input, extensionRegistry);
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};

Expand Down
Loading