forked from googleapis/gapic-generator
-
Benachrichtigungen
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated PHP generated surface (googleapis#225)
- Altered surface to match php-cs-fixer - Added sample generation
- Loading branch information
1 parent
b136e07
commit d5d75df
Showing
5 changed files
with
628 additions
and
124 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
src/main/java/com/google/api/codegen/php/PhpDocConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* Copyright 2016 Google Inc | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.api.codegen.php; | ||
|
||
import com.google.api.codegen.DocConfig; | ||
import com.google.api.codegen.metacode.InitCode; | ||
import com.google.api.codegen.metacode.InputParameter; | ||
import com.google.auto.value.AutoValue; | ||
import com.google.common.collect.ImmutableList; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* Represents the Php documentation settings for an Api method. | ||
*/ | ||
@AutoValue | ||
abstract class PhpDocConfig extends DocConfig { | ||
public static PhpDocConfig.Builder newBuilder() { | ||
return new AutoValue_PhpDocConfig.Builder(); | ||
} | ||
|
||
public abstract boolean isPagedVariant(); | ||
|
||
@Override | ||
@Nullable | ||
public abstract ImmutableList<InputParameter> getParams(); | ||
|
||
@AutoValue.Builder | ||
abstract static class Builder extends DocConfig.Builder<Builder> { | ||
|
||
public abstract PhpDocConfig build(); | ||
|
||
public abstract Builder setApiName(String serviceName); | ||
|
||
public abstract Builder setMethodName(String methodName); | ||
|
||
public abstract Builder setPagedVariant(boolean paged); | ||
|
||
public abstract Builder setReturnType(String returnType); | ||
|
||
public abstract Builder setInitCode(InitCode initCode); | ||
|
||
public abstract Builder setParams(ImmutableList<InputParameter> params); | ||
|
||
@Override | ||
protected Builder setInitCodeProxy(InitCode initCode) { | ||
return setInitCode(initCode); | ||
} | ||
|
||
@Override | ||
protected Builder setParamsProxy(ImmutableList<InputParameter> params) { | ||
return setParams(params); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.