Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial GAX submission - generated classes only #317

Merged
merged 6 commits into from
Nov 3, 2015
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
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ CopyRequest parse(String... args) {
if (args.length != 4) {
throw new IllegalArgumentException();
}
return CopyRequest.of(args[0], args[1], BlobInfo.builder(args[2], args[3]).build());
return CopyRequest.of(args[0], args[1], BlobId.of(args[2], args[3]));
}

@Override
Expand Down Expand Up @@ -544,11 +544,14 @@ public static void main(String... args) throws Exception {
StorageOptions.Builder optionsBuilder =
StorageOptions.builder().retryParams(RetryParams.getDefaultInstance());
StorageAction action;
String actionName;
if (args.length >= 2 && !ACTIONS.containsKey(args[0])) {
actionName = args[1];
optionsBuilder.projectId(args[0]);
action = ACTIONS.get(args[1]);
args = Arrays.copyOfRange(args, 2, args.length);
} else {
actionName = args[0];
action = ACTIONS.get(args[0]);
args = Arrays.copyOfRange(args, 1, args.length);
}
Expand All @@ -562,7 +565,7 @@ public static void main(String... args) throws Exception {
try {
request = action.parse(args);
} catch (IllegalArgumentException ex) {
System.out.println("Invalid input for action '" + args[1] + "'");
System.out.println("Invalid input for action '" + actionName + "'");
System.out.println("Expected: " + action.params());
return;
} catch (Exception ex) {
Expand Down
53 changes: 53 additions & 0 deletions gcloud-java-gax/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Google Cloud Java Client -- GAX
=========================================

This module provides common functionality required by service-specific modules of this library.

[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java)
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-gax.svg)](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-gax.svg)

- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/package-summary.html)

Quickstart
----------
Add this to your pom.xml file
```xml
<dependency>
<groupId>com.google.gcloud</groupId>
<artifactId>gcloud-java-gax</artifactId>
<version>0.0.10</version>
</dependency>
```

Java Versions
-------------

Java 7 or above is required for using this client.

Contributing
------------

Contributions to this library are always welcome and highly encouraged.

See [CONTRIBUTING] for more information on how to get started.

Versioning
----------

This library follows [Semantic Versioning] (http://semver.org/).

It is currently in major version zero (``0.y.z``), which means that anything
may change at any time and the public API should not be considered
stable.

License
-------

Apache 2.0 - See [LICENSE] for more information.


[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CONTRIBUTING.md
[LICENSE]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/LICENSE
[cloud-platform]: https://cloud.google.com/

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading