Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions 0.1.0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# exclude jar for gradle wrapper
!gradle/wrapper/*.jar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# build files
**/target
target
.gradle
build
23 changes: 23 additions & 0 deletions 0.1.0/.swagger-codegen-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
1 change: 1 addition & 0 deletions 0.1.0/.swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.5
17 changes: 17 additions & 0 deletions 0.1.0/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#
language: java
jdk:
- oraclejdk8
- oraclejdk7
before_install:
# ensure gradlew has proper permission
- chmod a+x ./gradlew
script:
# test using maven
- mvn test
# uncomment below to test using gradle
# - gradle test
# uncomment below to test using sbt
# - sbt test
224 changes: 224 additions & 0 deletions 0.1.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# swagger-java-client

grafeas.proto
- API version: version not set
- Build date: 2019-08-22T18:45:44.983-04:00

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)


*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*


## Requirements

Building the API client library requires:
1. Java 1.7+
2. Maven/Gradle

## Installation

To install the API client library to your local Maven repository, simply execute:

```shell
mvn clean install
```

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

```shell
mvn clean deploy
```

Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.

### Maven users

Add this dependency to your project's POM:

```xml
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-java-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
```

### Gradle users

Add this dependency to your project's build file:

```groovy
compile "io.swagger:swagger-java-client:1.0.0"
```

### Others

At first generate the JAR by executing:

```shell
mvn clean package
```

Then manually install the following JARs:

* `target/swagger-java-client-1.0.0.jar`
* `target/lib/*.jar`

## Getting Started

Please follow the [installation](#installation) instruction and execute the following Java code:

```java

import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GrafeasV1Beta1Api;

import java.io.File;
import java.util.*;

public class GrafeasV1Beta1ApiExample {

public static void main(String[] args) {

GrafeasV1Beta1Api apiInstance = new GrafeasV1Beta1Api();
String parent = "parent_example"; // String | The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created.
V1beta1BatchCreateNotesRequest body = new V1beta1BatchCreateNotesRequest(); // V1beta1BatchCreateNotesRequest |
try {
V1beta1BatchCreateNotesResponse result = apiInstance.batchCreateNotes(parent, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GrafeasV1Beta1Api#batchCreateNotes");
e.printStackTrace();
}
}
}

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*GrafeasV1Beta1Api* | [**batchCreateNotes**](docs/GrafeasV1Beta1Api.md#batchCreateNotes) | **POST** /v1beta1/{parent&#x3D;projects/*}/notes:batchCreate | Creates new notes in batch.
*GrafeasV1Beta1Api* | [**batchCreateOccurrences**](docs/GrafeasV1Beta1Api.md#batchCreateOccurrences) | **POST** /v1beta1/{parent&#x3D;projects/*}/occurrences:batchCreate | Creates new occurrences in batch.
*GrafeasV1Beta1Api* | [**createNote**](docs/GrafeasV1Beta1Api.md#createNote) | **POST** /v1beta1/{parent&#x3D;projects/*}/notes | Creates a new note.
*GrafeasV1Beta1Api* | [**createOccurrence**](docs/GrafeasV1Beta1Api.md#createOccurrence) | **POST** /v1beta1/{parent&#x3D;projects/*}/occurrences | Creates a new occurrence.
*GrafeasV1Beta1Api* | [**deleteNote**](docs/GrafeasV1Beta1Api.md#deleteNote) | **DELETE** /v1beta1/{name&#x3D;projects/*/notes/*} | Deletes the specified note.
*GrafeasV1Beta1Api* | [**deleteOccurrence**](docs/GrafeasV1Beta1Api.md#deleteOccurrence) | **DELETE** /v1beta1/{name&#x3D;projects/*/occurrences/*} | Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
*GrafeasV1Beta1Api* | [**getNote**](docs/GrafeasV1Beta1Api.md#getNote) | **GET** /v1beta1/{name&#x3D;projects/*/notes/*} | Gets the specified note.
*GrafeasV1Beta1Api* | [**getOccurrence**](docs/GrafeasV1Beta1Api.md#getOccurrence) | **GET** /v1beta1/{name&#x3D;projects/*/occurrences/*} | Gets the specified occurrence.
*GrafeasV1Beta1Api* | [**getOccurrenceNote**](docs/GrafeasV1Beta1Api.md#getOccurrenceNote) | **GET** /v1beta1/{name&#x3D;projects/*/occurrences/*}/notes | Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
*GrafeasV1Beta1Api* | [**getVulnerabilityOccurrencesSummary**](docs/GrafeasV1Beta1Api.md#getVulnerabilityOccurrencesSummary) | **GET** /v1beta1/{parent&#x3D;projects/*}/occurrences:vulnerabilitySummary | Gets a summary of the number and severity of occurrences.
*GrafeasV1Beta1Api* | [**listNoteOccurrences**](docs/GrafeasV1Beta1Api.md#listNoteOccurrences) | **GET** /v1beta1/{name&#x3D;projects/*/notes/*}/occurrences | Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
*GrafeasV1Beta1Api* | [**listNotes**](docs/GrafeasV1Beta1Api.md#listNotes) | **GET** /v1beta1/{parent&#x3D;projects/*}/notes | Lists notes for the specified project.
*GrafeasV1Beta1Api* | [**listOccurrences**](docs/GrafeasV1Beta1Api.md#listOccurrences) | **GET** /v1beta1/{parent&#x3D;projects/*}/occurrences | Lists occurrences for the specified project.
*GrafeasV1Beta1Api* | [**updateNote**](docs/GrafeasV1Beta1Api.md#updateNote) | **PATCH** /v1beta1/{name&#x3D;projects/*/notes/*} | Updates the specified note.
*GrafeasV1Beta1Api* | [**updateOccurrence**](docs/GrafeasV1Beta1Api.md#updateOccurrence) | **PATCH** /v1beta1/{name&#x3D;projects/*/occurrences/*} | Updates the specified occurrence.


## Documentation for Models

- [AliasContextKind](docs/AliasContextKind.md)
- [AttestationAttestation](docs/AttestationAttestation.md)
- [AttestationAuthority](docs/AttestationAuthority.md)
- [AttestationGenericSignedAttestation](docs/AttestationGenericSignedAttestation.md)
- [AttestationGenericSignedAttestationContentType](docs/AttestationGenericSignedAttestationContentType.md)
- [AttestationPgpSignedAttestation](docs/AttestationPgpSignedAttestation.md)
- [AttestationPgpSignedAttestationContentType](docs/AttestationPgpSignedAttestationContentType.md)
- [AuthorityHint](docs/AuthorityHint.md)
- [BuildBuild](docs/BuildBuild.md)
- [BuildBuildSignature](docs/BuildBuildSignature.md)
- [BuildSignatureKeyType](docs/BuildSignatureKeyType.md)
- [CVSSv3AttackComplexity](docs/CVSSv3AttackComplexity.md)
- [CVSSv3AttackVector](docs/CVSSv3AttackVector.md)
- [CVSSv3Impact](docs/CVSSv3Impact.md)
- [CVSSv3PrivilegesRequired](docs/CVSSv3PrivilegesRequired.md)
- [CVSSv3Scope](docs/CVSSv3Scope.md)
- [CVSSv3UserInteraction](docs/CVSSv3UserInteraction.md)
- [DeploymentDeployable](docs/DeploymentDeployable.md)
- [DeploymentDeployment](docs/DeploymentDeployment.md)
- [DeploymentPlatform](docs/DeploymentPlatform.md)
- [DiscoveredAnalysisStatus](docs/DiscoveredAnalysisStatus.md)
- [DiscoveredContinuousAnalysis](docs/DiscoveredContinuousAnalysis.md)
- [DiscoveryDiscovered](docs/DiscoveryDiscovered.md)
- [DiscoveryDiscovery](docs/DiscoveryDiscovery.md)
- [HashHashType](docs/HashHashType.md)
- [ImageBasis](docs/ImageBasis.md)
- [ImageDerived](docs/ImageDerived.md)
- [ImageFingerprint](docs/ImageFingerprint.md)
- [ImageLayer](docs/ImageLayer.md)
- [LayerDirective](docs/LayerDirective.md)
- [PackageArchitecture](docs/PackageArchitecture.md)
- [PackageDistribution](docs/PackageDistribution.md)
- [PackageInstallation](docs/PackageInstallation.md)
- [PackagePackage](docs/PackagePackage.md)
- [PackageVersion](docs/PackageVersion.md)
- [ProtobufAny](docs/ProtobufAny.md)
- [ProtobufFieldMask](docs/ProtobufFieldMask.md)
- [ProvenanceArtifact](docs/ProvenanceArtifact.md)
- [ProvenanceBuildProvenance](docs/ProvenanceBuildProvenance.md)
- [ProvenanceCommand](docs/ProvenanceCommand.md)
- [ProvenanceFileHashes](docs/ProvenanceFileHashes.md)
- [ProvenanceHash](docs/ProvenanceHash.md)
- [ProvenanceSource](docs/ProvenanceSource.md)
- [RpcStatus](docs/RpcStatus.md)
- [SourceAliasContext](docs/SourceAliasContext.md)
- [SourceCloudRepoSourceContext](docs/SourceCloudRepoSourceContext.md)
- [SourceGerritSourceContext](docs/SourceGerritSourceContext.md)
- [SourceGitSourceContext](docs/SourceGitSourceContext.md)
- [SourceProjectRepoId](docs/SourceProjectRepoId.md)
- [SourceRepoId](docs/SourceRepoId.md)
- [SourceSourceContext](docs/SourceSourceContext.md)
- [V1beta1BatchCreateNotesRequest](docs/V1beta1BatchCreateNotesRequest.md)
- [V1beta1BatchCreateNotesResponse](docs/V1beta1BatchCreateNotesResponse.md)
- [V1beta1BatchCreateOccurrencesRequest](docs/V1beta1BatchCreateOccurrencesRequest.md)
- [V1beta1BatchCreateOccurrencesResponse](docs/V1beta1BatchCreateOccurrencesResponse.md)
- [V1beta1ListNoteOccurrencesResponse](docs/V1beta1ListNoteOccurrencesResponse.md)
- [V1beta1ListNotesResponse](docs/V1beta1ListNotesResponse.md)
- [V1beta1ListOccurrencesResponse](docs/V1beta1ListOccurrencesResponse.md)
- [V1beta1Note](docs/V1beta1Note.md)
- [V1beta1NoteKind](docs/V1beta1NoteKind.md)
- [V1beta1Occurrence](docs/V1beta1Occurrence.md)
- [V1beta1RelatedUrl](docs/V1beta1RelatedUrl.md)
- [V1beta1Resource](docs/V1beta1Resource.md)
- [V1beta1Signature](docs/V1beta1Signature.md)
- [V1beta1VulnerabilityOccurrencesSummary](docs/V1beta1VulnerabilityOccurrencesSummary.md)
- [V1beta1attestationDetails](docs/V1beta1attestationDetails.md)
- [V1beta1buildDetails](docs/V1beta1buildDetails.md)
- [V1beta1deploymentDetails](docs/V1beta1deploymentDetails.md)
- [V1beta1discoveryDetails](docs/V1beta1discoveryDetails.md)
- [V1beta1imageDetails](docs/V1beta1imageDetails.md)
- [V1beta1packageDetails](docs/V1beta1packageDetails.md)
- [V1beta1packageLocation](docs/V1beta1packageLocation.md)
- [V1beta1vulnerabilityDetails](docs/V1beta1vulnerabilityDetails.md)
- [VersionVersionKind](docs/VersionVersionKind.md)
- [VulnerabilityCVSSv3](docs/VulnerabilityCVSSv3.md)
- [VulnerabilityDetail](docs/VulnerabilityDetail.md)
- [VulnerabilityOccurrencesSummaryFixableTotalByDigest](docs/VulnerabilityOccurrencesSummaryFixableTotalByDigest.md)
- [VulnerabilityPackageIssue](docs/VulnerabilityPackageIssue.md)
- [VulnerabilitySeverity](docs/VulnerabilitySeverity.md)
- [VulnerabilityVulnerability](docs/VulnerabilityVulnerability.md)
- [VulnerabilityVulnerabilityLocation](docs/VulnerabilityVulnerabilityLocation.md)
- [VulnerabilityWindowsDetail](docs/VulnerabilityWindowsDetail.md)
- [WindowsDetailKnowledgeBase](docs/WindowsDetailKnowledgeBase.md)


## Documentation for Authorization

All endpoints do not require authorization.
Authentication schemes defined for the API:

## Recommendation

It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.

## Author



104 changes: 104 additions & 0 deletions 0.1.0/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
apply plugin: 'idea'
apply plugin: 'eclipse'

group = 'io.swagger'
version = '1.0.0'

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}

repositories {
jcenter()
}


if(hasProperty('target') && target == 'android') {

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

// Rename the aar correctly
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}

dependencies {
provided 'javax.annotation:jsr250-api:1.0'
}
}

afterEvaluate {
android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
task.description = "Create jar artifact for ${variant.name}"
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

} else {

apply plugin: 'java'
apply plugin: 'maven'

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

install {
repositories.mavenInstaller {
pom.artifactId = 'swagger-java-client'
}
}

task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
}

dependencies {
compile 'io.swagger:swagger-annotations:1.5.17'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
compile 'com.google.code.gson:gson:2.8.1'
compile 'io.gsonfire:gson-fire:1.8.0'
compile 'org.threeten:threetenbp:1.3.5'
testCompile 'junit:junit:4.12'
}
Loading