/* * Copyright 2019 The Grafeas Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.grafeas.v1; import static io.grpc.MethodDescriptor.generateFullMethodName; /** * * *
* [Grafeas](https://grafeas.io) API. * Retrieves analysis results of Cloud components such as Docker container * images. * Analysis results are stored as a series of occurrences. An `Occurrence` * contains information about a specific analysis instance on a resource. An * occurrence refers to a `Note`. A note contains details describing the * analysis and is generally stored in a separate project, called a `Provider`. * Multiple occurrences can refer to the same note. * For example, an SSL vulnerability could affect multiple images. In this case, * there would be one note for the vulnerability and an occurrence for each * image with the vulnerability referring to that note. **/ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: grafeas/v1/grafeas.proto") @io.grpc.stub.annotations.GrpcGenerated public final class GrafeasGrpc { private GrafeasGrpc() {} public static final String SERVICE_NAME = "grafeas.v1.Grafeas"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor< io.grafeas.v1.GetOccurrenceRequest, io.grafeas.v1.Occurrence> getGetOccurrenceMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetOccurrence", requestType = io.grafeas.v1.GetOccurrenceRequest.class, responseType = io.grafeas.v1.Occurrence.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< io.grafeas.v1.GetOccurrenceRequest, io.grafeas.v1.Occurrence> getGetOccurrenceMethod() { io.grpc.MethodDescriptor
* [Grafeas](https://grafeas.io) API. * Retrieves analysis results of Cloud components such as Docker container * images. * Analysis results are stored as a series of occurrences. An `Occurrence` * contains information about a specific analysis instance on a resource. An * occurrence refers to a `Note`. A note contains details describing the * analysis and is generally stored in a separate project, called a `Provider`. * Multiple occurrences can refer to the same note. * For example, an SSL vulnerability could affect multiple images. In this case, * there would be one note for the vulnerability and an occurrence for each * image with the vulnerability referring to that note. **/ public interface AsyncService { /** * * *
* Gets the specified occurrence.
*
*/
default void getOccurrence(
io.grafeas.v1.GetOccurrenceRequest request,
io.grpc.stub.StreamObserver
* Lists occurrences for the specified project.
*
*/
default void listOccurrences(
io.grafeas.v1.ListOccurrencesRequest request,
io.grpc.stub.StreamObserver
* Deletes the specified occurrence. For example, use this method to delete an
* occurrence when the occurrence is no longer applicable for the given
* resource.
*
*/
default void deleteOccurrence(
io.grafeas.v1.DeleteOccurrenceRequest request,
io.grpc.stub.StreamObserver
* Creates a new occurrence.
*
*/
default void createOccurrence(
io.grafeas.v1.CreateOccurrenceRequest request,
io.grpc.stub.StreamObserver
* Creates new occurrences in batch.
*
*/
default void batchCreateOccurrences(
io.grafeas.v1.BatchCreateOccurrencesRequest request,
io.grpc.stub.StreamObserver
* Updates the specified occurrence.
*
*/
default void updateOccurrence(
io.grafeas.v1.UpdateOccurrenceRequest request,
io.grpc.stub.StreamObserver
* Gets the note attached to the specified occurrence. Consumer projects can
* use this method to get a note that belongs to a provider project.
*
*/
default void getOccurrenceNote(
io.grafeas.v1.GetOccurrenceNoteRequest request,
io.grpc.stub.StreamObserver
* Gets the specified note.
*
*/
default void getNote(
io.grafeas.v1.GetNoteRequest request,
io.grpc.stub.StreamObserver
* Lists notes for the specified project.
*
*/
default void listNotes(
io.grafeas.v1.ListNotesRequest request,
io.grpc.stub.StreamObserver
* Deletes the specified note.
*
*/
default void deleteNote(
io.grafeas.v1.DeleteNoteRequest request,
io.grpc.stub.StreamObserver
* Creates a new note.
*
*/
default void createNote(
io.grafeas.v1.CreateNoteRequest request,
io.grpc.stub.StreamObserver
* Creates new notes in batch.
*
*/
default void batchCreateNotes(
io.grafeas.v1.BatchCreateNotesRequest request,
io.grpc.stub.StreamObserver
* Updates the specified note.
*
*/
default void updateNote(
io.grafeas.v1.UpdateNoteRequest request,
io.grpc.stub.StreamObserver
* Lists occurrences referencing the specified note. Provider projects can use
* this method to get all occurrences across consumer projects referencing the
* specified note.
*
*/
default void listNoteOccurrences(
io.grafeas.v1.ListNoteOccurrencesRequest request,
io.grpc.stub.StreamObserver* [Grafeas](https://grafeas.io) API. * Retrieves analysis results of Cloud components such as Docker container * images. * Analysis results are stored as a series of occurrences. An `Occurrence` * contains information about a specific analysis instance on a resource. An * occurrence refers to a `Note`. A note contains details describing the * analysis and is generally stored in a separate project, called a `Provider`. * Multiple occurrences can refer to the same note. * For example, an SSL vulnerability could affect multiple images. In this case, * there would be one note for the vulnerability and an occurrence for each * image with the vulnerability referring to that note. **/ public abstract static class GrafeasImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return GrafeasGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Grafeas. * *
* [Grafeas](https://grafeas.io) API. * Retrieves analysis results of Cloud components such as Docker container * images. * Analysis results are stored as a series of occurrences. An `Occurrence` * contains information about a specific analysis instance on a resource. An * occurrence refers to a `Note`. A note contains details describing the * analysis and is generally stored in a separate project, called a `Provider`. * Multiple occurrences can refer to the same note. * For example, an SSL vulnerability could affect multiple images. In this case, * there would be one note for the vulnerability and an occurrence for each * image with the vulnerability referring to that note. **/ public static final class GrafeasStub extends io.grpc.stub.AbstractAsyncStub
* Gets the specified occurrence.
*
*/
public void getOccurrence(
io.grafeas.v1.GetOccurrenceRequest request,
io.grpc.stub.StreamObserver
* Lists occurrences for the specified project.
*
*/
public void listOccurrences(
io.grafeas.v1.ListOccurrencesRequest request,
io.grpc.stub.StreamObserver
* Deletes the specified occurrence. For example, use this method to delete an
* occurrence when the occurrence is no longer applicable for the given
* resource.
*
*/
public void deleteOccurrence(
io.grafeas.v1.DeleteOccurrenceRequest request,
io.grpc.stub.StreamObserver
* Creates a new occurrence.
*
*/
public void createOccurrence(
io.grafeas.v1.CreateOccurrenceRequest request,
io.grpc.stub.StreamObserver
* Creates new occurrences in batch.
*
*/
public void batchCreateOccurrences(
io.grafeas.v1.BatchCreateOccurrencesRequest request,
io.grpc.stub.StreamObserver
* Updates the specified occurrence.
*
*/
public void updateOccurrence(
io.grafeas.v1.UpdateOccurrenceRequest request,
io.grpc.stub.StreamObserver
* Gets the note attached to the specified occurrence. Consumer projects can
* use this method to get a note that belongs to a provider project.
*
*/
public void getOccurrenceNote(
io.grafeas.v1.GetOccurrenceNoteRequest request,
io.grpc.stub.StreamObserver
* Gets the specified note.
*
*/
public void getNote(
io.grafeas.v1.GetNoteRequest request,
io.grpc.stub.StreamObserver
* Lists notes for the specified project.
*
*/
public void listNotes(
io.grafeas.v1.ListNotesRequest request,
io.grpc.stub.StreamObserver
* Deletes the specified note.
*
*/
public void deleteNote(
io.grafeas.v1.DeleteNoteRequest request,
io.grpc.stub.StreamObserver
* Creates a new note.
*
*/
public void createNote(
io.grafeas.v1.CreateNoteRequest request,
io.grpc.stub.StreamObserver
* Creates new notes in batch.
*
*/
public void batchCreateNotes(
io.grafeas.v1.BatchCreateNotesRequest request,
io.grpc.stub.StreamObserver
* Updates the specified note.
*
*/
public void updateNote(
io.grafeas.v1.UpdateNoteRequest request,
io.grpc.stub.StreamObserver
* Lists occurrences referencing the specified note. Provider projects can use
* this method to get all occurrences across consumer projects referencing the
* specified note.
*
*/
public void listNoteOccurrences(
io.grafeas.v1.ListNoteOccurrencesRequest request,
io.grpc.stub.StreamObserver* [Grafeas](https://grafeas.io) API. * Retrieves analysis results of Cloud components such as Docker container * images. * Analysis results are stored as a series of occurrences. An `Occurrence` * contains information about a specific analysis instance on a resource. An * occurrence refers to a `Note`. A note contains details describing the * analysis and is generally stored in a separate project, called a `Provider`. * Multiple occurrences can refer to the same note. * For example, an SSL vulnerability could affect multiple images. In this case, * there would be one note for the vulnerability and an occurrence for each * image with the vulnerability referring to that note. **/ public static final class GrafeasBlockingStub extends io.grpc.stub.AbstractBlockingStub
* Gets the specified occurrence.
*
*/
public io.grafeas.v1.Occurrence getOccurrence(io.grafeas.v1.GetOccurrenceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetOccurrenceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Lists occurrences for the specified project.
*
*/
public io.grafeas.v1.ListOccurrencesResponse listOccurrences(
io.grafeas.v1.ListOccurrencesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListOccurrencesMethod(), getCallOptions(), request);
}
/**
*
*
*
* Deletes the specified occurrence. For example, use this method to delete an
* occurrence when the occurrence is no longer applicable for the given
* resource.
*
*/
public com.google.protobuf.Empty deleteOccurrence(
io.grafeas.v1.DeleteOccurrenceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteOccurrenceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Creates a new occurrence.
*
*/
public io.grafeas.v1.Occurrence createOccurrence(
io.grafeas.v1.CreateOccurrenceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateOccurrenceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Creates new occurrences in batch.
*
*/
public io.grafeas.v1.BatchCreateOccurrencesResponse batchCreateOccurrences(
io.grafeas.v1.BatchCreateOccurrencesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getBatchCreateOccurrencesMethod(), getCallOptions(), request);
}
/**
*
*
*
* Updates the specified occurrence.
*
*/
public io.grafeas.v1.Occurrence updateOccurrence(
io.grafeas.v1.UpdateOccurrenceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateOccurrenceMethod(), getCallOptions(), request);
}
/**
*
*
*
* Gets the note attached to the specified occurrence. Consumer projects can
* use this method to get a note that belongs to a provider project.
*
*/
public io.grafeas.v1.Note getOccurrenceNote(io.grafeas.v1.GetOccurrenceNoteRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetOccurrenceNoteMethod(), getCallOptions(), request);
}
/**
*
*
*
* Gets the specified note.
*
*/
public io.grafeas.v1.Note getNote(io.grafeas.v1.GetNoteRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetNoteMethod(), getCallOptions(), request);
}
/**
*
*
*
* Lists notes for the specified project.
*
*/
public io.grafeas.v1.ListNotesResponse listNotes(io.grafeas.v1.ListNotesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListNotesMethod(), getCallOptions(), request);
}
/**
*
*
*
* Deletes the specified note.
*
*/
public com.google.protobuf.Empty deleteNote(io.grafeas.v1.DeleteNoteRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteNoteMethod(), getCallOptions(), request);
}
/**
*
*
*
* Creates a new note.
*
*/
public io.grafeas.v1.Note createNote(io.grafeas.v1.CreateNoteRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateNoteMethod(), getCallOptions(), request);
}
/**
*
*
*
* Creates new notes in batch.
*
*/
public io.grafeas.v1.BatchCreateNotesResponse batchCreateNotes(
io.grafeas.v1.BatchCreateNotesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getBatchCreateNotesMethod(), getCallOptions(), request);
}
/**
*
*
*
* Updates the specified note.
*
*/
public io.grafeas.v1.Note updateNote(io.grafeas.v1.UpdateNoteRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateNoteMethod(), getCallOptions(), request);
}
/**
*
*
*
* Lists occurrences referencing the specified note. Provider projects can use
* this method to get all occurrences across consumer projects referencing the
* specified note.
*
*/
public io.grafeas.v1.ListNoteOccurrencesResponse listNoteOccurrences(
io.grafeas.v1.ListNoteOccurrencesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListNoteOccurrencesMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Grafeas.
*
* * [Grafeas](https://grafeas.io) API. * Retrieves analysis results of Cloud components such as Docker container * images. * Analysis results are stored as a series of occurrences. An `Occurrence` * contains information about a specific analysis instance on a resource. An * occurrence refers to a `Note`. A note contains details describing the * analysis and is generally stored in a separate project, called a `Provider`. * Multiple occurrences can refer to the same note. * For example, an SSL vulnerability could affect multiple images. In this case, * there would be one note for the vulnerability and an occurrence for each * image with the vulnerability referring to that note. **/ public static final class GrafeasFutureStub extends io.grpc.stub.AbstractFutureStub
* Gets the specified occurrence.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Lists occurrences for the specified project.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Deletes the specified occurrence. For example, use this method to delete an
* occurrence when the occurrence is no longer applicable for the given
* resource.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Creates a new occurrence.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Creates new occurrences in batch.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
io.grafeas.v1.BatchCreateOccurrencesResponse>
batchCreateOccurrences(io.grafeas.v1.BatchCreateOccurrencesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getBatchCreateOccurrencesMethod(), getCallOptions()), request);
}
/**
*
*
*
* Updates the specified occurrence.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Gets the note attached to the specified occurrence. Consumer projects can
* use this method to get a note that belongs to a provider project.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Gets the specified note.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Lists notes for the specified project.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Deletes the specified note.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Creates a new note.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Creates new notes in batch.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
io.grafeas.v1.BatchCreateNotesResponse>
batchCreateNotes(io.grafeas.v1.BatchCreateNotesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getBatchCreateNotesMethod(), getCallOptions()), request);
}
/**
*
*
*
* Updates the specified note.
*
*/
public com.google.common.util.concurrent.ListenableFuture
* Lists occurrences referencing the specified note. Provider projects can use
* this method to get all occurrences across consumer projects referencing the
* specified note.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
io.grafeas.v1.ListNoteOccurrencesResponse>
listNoteOccurrences(io.grafeas.v1.ListNoteOccurrencesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListNoteOccurrencesMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_OCCURRENCE = 0;
private static final int METHODID_LIST_OCCURRENCES = 1;
private static final int METHODID_DELETE_OCCURRENCE = 2;
private static final int METHODID_CREATE_OCCURRENCE = 3;
private static final int METHODID_BATCH_CREATE_OCCURRENCES = 4;
private static final int METHODID_UPDATE_OCCURRENCE = 5;
private static final int METHODID_GET_OCCURRENCE_NOTE = 6;
private static final int METHODID_GET_NOTE = 7;
private static final int METHODID_LIST_NOTES = 8;
private static final int METHODID_DELETE_NOTE = 9;
private static final int METHODID_CREATE_NOTE = 10;
private static final int METHODID_BATCH_CREATE_NOTES = 11;
private static final int METHODID_UPDATE_NOTE = 12;
private static final int METHODID_LIST_NOTE_OCCURRENCES = 13;
private static final class MethodHandlers