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

feat: gapic-generator-java v1.0.13, mtls support #712

Merged
merged 3 commits into from Aug 5, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -336,6 +336,11 @@ public static String getDefaultEndpoint() {
return "firestore.googleapis.com:443";
}

/** Returns the default mTLS service endpoint. */
public static String getDefaultMtlsEndpoint() {
return "firestore.mtls.googleapis.com:443";
}

/** Returns the default service scopes. */
public static List<String> getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
Expand Down Expand Up @@ -543,6 +548,8 @@ private static Builder createDefault() {
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);

return initDefaults(builder);
}
Expand Down
Expand Up @@ -414,6 +414,11 @@ public static String getDefaultEndpoint() {
return "firestore.googleapis.com:443";
}

/** Returns the default mTLS service endpoint. */
public static String getDefaultMtlsEndpoint() {
return "firestore.mtls.googleapis.com:443";
}

/** Returns the default service scopes. */
public static List<String> getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
Expand Down Expand Up @@ -704,6 +709,8 @@ private static Builder createDefault() {
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);

return initDefaults(builder);
}
Expand Down
Expand Up @@ -211,9 +211,9 @@ public Builder setCollection(String collection) {
}

private Builder(CollectionGroupName collectionGroupName) {
project = collectionGroupName.project;
database = collectionGroupName.database;
collection = collectionGroupName.collection;
this.project = collectionGroupName.project;
this.database = collectionGroupName.database;
this.collection = collectionGroupName.collection;
}

public CollectionGroupName build() {
Expand Down
Expand Up @@ -181,8 +181,8 @@ public Builder setDatabase(String database) {
}

private Builder(DatabaseName databaseName) {
project = databaseName.project;
database = databaseName.database;
this.project = databaseName.project;
this.database = databaseName.database;
}

public DatabaseName build() {
Expand Down
Expand Up @@ -247,10 +247,10 @@ public Builder setField(String field) {
}

private Builder(FieldName fieldName) {
project = fieldName.project;
database = fieldName.database;
collection = fieldName.collection;
field = fieldName.field;
this.project = fieldName.project;
this.database = fieldName.database;
this.collection = fieldName.collection;
this.field = fieldName.field;
}

public FieldName build() {
Expand Down
Expand Up @@ -247,10 +247,10 @@ public Builder setIndex(String index) {
}

private Builder(IndexName indexName) {
project = indexName.project;
database = indexName.database;
collection = indexName.collection;
index = indexName.index;
this.project = indexName.project;
this.database = indexName.database;
this.collection = indexName.collection;
this.index = indexName.index;
}

public IndexName build() {
Expand Down
4 changes: 2 additions & 2 deletions synth.metadata
Expand Up @@ -11,8 +11,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "9e3105549a35520f215359065c11e8dce15e18af",
"internalRef": "378266372"
"sha": "551681f25e36b11829e87e580281350461f4f3f5",
"internalRef": "379784268"
}
},
{
Expand Down