|
| 1 | +/* |
| 2 | + * Copyright 2015 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.dns; |
| 18 | + |
| 19 | +import com.google.gcloud.ServiceOptions; |
| 20 | +import com.google.gcloud.spi.DnsServiceRpc; |
| 21 | +import com.google.gcloud.spi.DnsServiceRpcFactory; |
| 22 | + |
| 23 | +import java.util.Set; |
| 24 | + |
| 25 | +public class DnsServiceOptions |
| 26 | + extends ServiceOptions<DnsService, DnsServiceRpc, DnsServiceOptions> { |
| 27 | + |
| 28 | + private static final long serialVersionUID = -5311219368450107146L; |
| 29 | + |
| 30 | + // TODO(mderka) Finish implementation. Created issue #595. |
| 31 | + |
| 32 | + public static class DefaultDnsServiceFactory implements DnsServiceFactory { |
| 33 | + private static final DnsServiceFactory INSTANCE = new DefaultDnsServiceFactory(); |
| 34 | + |
| 35 | + @Override |
| 36 | + public DnsService create(DnsServiceOptions options) { |
| 37 | + // TODO(mderka) Implement. Created issue #595. |
| 38 | + return null; |
| 39 | + } |
| 40 | + } |
| 41 | + |
| 42 | + public static class Builder extends ServiceOptions.Builder<DnsService, DnsServiceRpc, |
| 43 | + DnsServiceOptions, Builder> { |
| 44 | + |
| 45 | + private Builder() { |
| 46 | + } |
| 47 | + |
| 48 | + private Builder(DnsServiceOptions options) { |
| 49 | + super(options); |
| 50 | + } |
| 51 | + |
| 52 | + @Override |
| 53 | + public DnsServiceOptions build() { |
| 54 | + return new DnsServiceOptions(this); |
| 55 | + } |
| 56 | + } |
| 57 | + |
| 58 | + private DnsServiceOptions(Builder builder) { |
| 59 | + super(DnsServiceFactory.class, DnsServiceRpcFactory.class, builder); |
| 60 | + } |
| 61 | + |
| 62 | + @Override |
| 63 | + protected DnsServiceFactory defaultServiceFactory() { |
| 64 | + return DefaultDnsServiceFactory.INSTANCE; |
| 65 | + } |
| 66 | + |
| 67 | + @Override |
| 68 | + protected DnsServiceRpcFactory defaultRpcFactory() { |
| 69 | + return null; |
| 70 | + } |
| 71 | + |
| 72 | + @Override |
| 73 | + protected Set<String> scopes() { |
| 74 | + return null; |
| 75 | + } |
| 76 | + |
| 77 | + @Override |
| 78 | + public Builder toBuilder() { |
| 79 | + return new Builder(this); |
| 80 | + } |
| 81 | + |
| 82 | + public static Builder builder() { |
| 83 | + return new Builder(); |
| 84 | + } |
| 85 | +} |
0 commit comments