Skip to content

Commit

Permalink
Merge pull request #418 from dropbox/wd/checkin_sources
Browse files Browse the repository at this point in the history
Adds generated source to repo and adds CI checks
  • Loading branch information
wdziemia authored Aug 29, 2022
2 parents b956e7b + b530875 commit 9142328
Show file tree
Hide file tree
Showing 2,228 changed files with 495,662 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@ jobs:
- name: Grant execute permissions
run: chmod +x gradlew && chmod +x update-submodules
&& chmod +x generate-ci-auth-file && chmod +x scripts/run-examples
&& chmod +x scripts/check-clean-git-status

- name: Set up submodules
run: ./update-submodules

- name: Generate Stone
run: ./gradlew :generateStone

- name: Ensure no generated code changes
run: ./scripts/check-clean-git-status

- name: Obtain access token
env:
APP_KEY: ${{ secrets.APP_KEY }}
Expand Down
Empty file.
1 change: 1 addition & 0 deletions generated_stone_source/main/refs/javadoc-refs.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/* DO NOT EDIT */
/* This file was generated by Stone */

package com.dropbox.core.v2;

import com.dropbox.core.v2.auth.DbxAppAuthRequests;
import com.dropbox.core.v2.check.DbxAppCheckRequests;
import com.dropbox.core.v2.files.DbxAppFilesRequests;
import com.dropbox.core.v2.sharing.DbxAppSharingRequests;

/**
* Base class for app auth clients.
*/
public class DbxAppClientV2Base {
protected final DbxRawClientV2 _client;

private final DbxAppAuthRequests auth;
private final DbxAppCheckRequests check;
private final DbxAppFilesRequests files;
private final DbxAppSharingRequests sharing;

/**
* For internal use only.
*
* @param _client Raw v2 client to use for issuing requests
*/
protected DbxAppClientV2Base(DbxRawClientV2 _client) {
this._client = _client;
this.auth = new DbxAppAuthRequests(_client);
this.check = new DbxAppCheckRequests(_client);
this.files = new DbxAppFilesRequests(_client);
this.sharing = new DbxAppSharingRequests(_client);
}

/**
* Returns client for issuing requests in the {@code "auth"} namespace.
*
* @return Dropbox auth client
*/
public DbxAppAuthRequests auth() {
return auth;
}

/**
* Returns client for issuing requests in the {@code "check"} namespace.
*
* @return Dropbox check client
*/
public DbxAppCheckRequests check() {
return check;
}

/**
* Returns client for issuing requests in the {@code "files"} namespace.
*
* @return Dropbox files client
*/
public DbxAppFilesRequests files() {
return files;
}

/**
* Returns client for issuing requests in the {@code "sharing"} namespace.
*
* @return Dropbox sharing client
*/
public DbxAppSharingRequests sharing() {
return sharing;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
/* DO NOT EDIT */
/* This file was generated by Stone */

package com.dropbox.core.v2;

import com.dropbox.core.v2.account.DbxUserAccountRequests;
import com.dropbox.core.v2.auth.DbxUserAuthRequests;
import com.dropbox.core.v2.check.DbxUserCheckRequests;
import com.dropbox.core.v2.contacts.DbxUserContactsRequests;
import com.dropbox.core.v2.fileproperties.DbxUserFilePropertiesRequests;
import com.dropbox.core.v2.filerequests.DbxUserFileRequestsRequests;
import com.dropbox.core.v2.files.DbxUserFilesRequests;
import com.dropbox.core.v2.paper.DbxUserPaperRequests;
import com.dropbox.core.v2.sharing.DbxUserSharingRequests;
import com.dropbox.core.v2.users.DbxUserUsersRequests;

/**
* Base class for user auth clients.
*/
public class DbxClientV2Base {
protected final DbxRawClientV2 _client;

private final DbxUserAccountRequests account;
private final DbxUserAuthRequests auth;
private final DbxUserCheckRequests check;
private final DbxUserContactsRequests contacts;
private final DbxUserFilePropertiesRequests fileProperties;
private final DbxUserFileRequestsRequests fileRequests;
private final DbxUserFilesRequests files;
private final DbxUserPaperRequests paper;
private final DbxUserSharingRequests sharing;
private final DbxUserUsersRequests users;

/**
* For internal use only.
*
* @param _client Raw v2 client to use for issuing requests
*/
protected DbxClientV2Base(DbxRawClientV2 _client) {
this._client = _client;
this.account = new DbxUserAccountRequests(_client);
this.auth = new DbxUserAuthRequests(_client);
this.check = new DbxUserCheckRequests(_client);
this.contacts = new DbxUserContactsRequests(_client);
this.fileProperties = new DbxUserFilePropertiesRequests(_client);
this.fileRequests = new DbxUserFileRequestsRequests(_client);
this.files = new DbxUserFilesRequests(_client);
this.paper = new DbxUserPaperRequests(_client);
this.sharing = new DbxUserSharingRequests(_client);
this.users = new DbxUserUsersRequests(_client);
}

/**
* Returns client for issuing requests in the {@code "account"} namespace.
*
* @return Dropbox account client
*/
public DbxUserAccountRequests account() {
return account;
}

/**
* Returns client for issuing requests in the {@code "auth"} namespace.
*
* @return Dropbox auth client
*/
public DbxUserAuthRequests auth() {
return auth;
}

/**
* Returns client for issuing requests in the {@code "check"} namespace.
*
* @return Dropbox check client
*/
public DbxUserCheckRequests check() {
return check;
}

/**
* Returns client for issuing requests in the {@code "contacts"} namespace.
*
* @return Dropbox contacts client
*/
public DbxUserContactsRequests contacts() {
return contacts;
}

/**
* Returns client for issuing requests in the {@code "file_properties"}
* namespace.
*
* @return Dropbox file_properties client
*/
public DbxUserFilePropertiesRequests fileProperties() {
return fileProperties;
}

/**
* Returns client for issuing requests in the {@code "file_requests"}
* namespace.
*
* @return Dropbox file_requests client
*/
public DbxUserFileRequestsRequests fileRequests() {
return fileRequests;
}

/**
* Returns client for issuing requests in the {@code "files"} namespace.
*
* @return Dropbox files client
*/
public DbxUserFilesRequests files() {
return files;
}

/**
* Returns client for issuing requests in the {@code "paper"} namespace.
*
* @return Dropbox paper client
*/
public DbxUserPaperRequests paper() {
return paper;
}

/**
* Returns client for issuing requests in the {@code "sharing"} namespace.
*
* @return Dropbox sharing client
*/
public DbxUserSharingRequests sharing() {
return sharing;
}

/**
* Returns client for issuing requests in the {@code "users"} namespace.
*
* @return Dropbox users client
*/
public DbxUserUsersRequests users() {
return users;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* DO NOT EDIT */
/* This file was generated by Stone */

package com.dropbox.core.v2;

import com.dropbox.core.v2.fileproperties.DbxTeamFilePropertiesRequests;
import com.dropbox.core.v2.team.DbxTeamTeamRequests;
import com.dropbox.core.v2.teamlog.DbxTeamTeamLogRequests;

/**
* Base class for team auth clients.
*/
public class DbxTeamClientV2Base {
protected final DbxRawClientV2 _client;

private final DbxTeamFilePropertiesRequests fileProperties;
private final DbxTeamTeamRequests team;
private final DbxTeamTeamLogRequests teamLog;

/**
* For internal use only.
*
* @param _client Raw v2 client to use for issuing requests
*/
protected DbxTeamClientV2Base(DbxRawClientV2 _client) {
this._client = _client;
this.fileProperties = new DbxTeamFilePropertiesRequests(_client);
this.team = new DbxTeamTeamRequests(_client);
this.teamLog = new DbxTeamTeamLogRequests(_client);
}

/**
* Returns client for issuing requests in the {@code "file_properties"}
* namespace.
*
* @return Dropbox file_properties client
*/
public DbxTeamFilePropertiesRequests fileProperties() {
return fileProperties;
}

/**
* Returns client for issuing requests in the {@code "team"} namespace.
*
* @return Dropbox team client
*/
public DbxTeamTeamRequests team() {
return team;
}

/**
* Returns client for issuing requests in the {@code "team_log"} namespace.
*
* @return Dropbox team_log client
*/
public DbxTeamTeamLogRequests teamLog() {
return teamLog;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* DO NOT EDIT */
/* This file was generated from account.stone */

package com.dropbox.core.v2.account;

import com.dropbox.core.DbxException;
import com.dropbox.core.DbxWrappedException;
import com.dropbox.core.http.HttpRequestor;
import com.dropbox.core.v2.DbxRawClientV2;

import java.util.HashMap;
import java.util.Map;

/**
* Routes in namespace "account".
*/
public class DbxUserAccountRequests {
// namespace account (account.stone)

private final DbxRawClientV2 client;

public DbxUserAccountRequests(DbxRawClientV2 client) {
this.client = client;
}

//
// route 2/account/set_profile_photo
//

/**
* Sets a user's profile photo.
*
*/
SetProfilePhotoResult setProfilePhoto(SetProfilePhotoArg arg) throws SetProfilePhotoErrorException, DbxException {
try {
return this.client.rpcStyle(this.client.getHost().getApi(),
"2/account/set_profile_photo",
arg,
false,
SetProfilePhotoArg.Serializer.INSTANCE,
SetProfilePhotoResult.Serializer.INSTANCE,
SetProfilePhotoError.Serializer.INSTANCE);
}
catch (DbxWrappedException ex) {
throw new SetProfilePhotoErrorException("2/account/set_profile_photo", ex.getRequestId(), ex.getUserMessage(), (SetProfilePhotoError) ex.getErrorValue());
}
}

/**
* Sets a user's profile photo.
*
* @param photo Image to set as the user's new profile photo. Must not be
* {@code null}.
*
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
public SetProfilePhotoResult setProfilePhoto(PhotoSourceArg photo) throws SetProfilePhotoErrorException, DbxException {
SetProfilePhotoArg _arg = new SetProfilePhotoArg(photo);
return setProfilePhoto(_arg);
}
}
Loading

0 comments on commit 9142328

Please sign in to comment.