Skip to content

Commit 0af01f2

Browse files
committed
---
yaml --- r: 4073 b: refs/heads/gcs-nio c: 81cedc4 h: refs/heads/master i: 4071: 62e17a9
1 parent 871cbc8 commit 0af01f2

2 files changed

Lines changed: 57 additions & 1 deletion

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ refs/tags/v0.0.12: 2fd8066e891fb3dfea69b65f6bf6461db79342b9
1111
refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212
refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313
refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
14-
refs/heads/gcs-nio: 06becd885dc0d4c45cd779a06be448b5179e77d1
14+
refs/heads/gcs-nio: 81cedc4edf78e745817c831c1d7cde7653dfc4f8
1515
refs/heads/logging-alpha: db5312bffa7fccac194f6a7feb8cc3066de16aff
1616
refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717
refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright 2016 Google Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.gcloud.spi;
18+
19+
import java.util.Map;
20+
21+
public interface DnsServiceRpc {
22+
23+
enum Option {
24+
FIELDS("fields"),
25+
PAGE_SIZE("maxSize"),
26+
PAGE_TOKEN("pageToken"),
27+
DNS_NAME("dnsName"),
28+
SORTING_KEY("sortBy"),
29+
SORTING_ORDER("sortOrder");
30+
31+
private final String value;
32+
33+
Option(String value) {
34+
this.value = value;
35+
}
36+
37+
public String value() {
38+
return value;
39+
}
40+
41+
@SuppressWarnings("unchecked")
42+
<T> T get(Map<Option, ?> options) {
43+
return (T) options.get(this);
44+
}
45+
46+
String getString(Map<Option, ?> options) {
47+
return get(options);
48+
}
49+
50+
Integer getInt(Map<Option, ?> options) {
51+
return get(options);
52+
}
53+
}
54+
55+
//TODO(mderka) add supported operations. Created issue #594.
56+
}

0 commit comments

Comments
 (0)