Skip to content

Commit f14fed9

Browse files
yoshi-automationtseaver
authored andcommitted
Copy lintified proto files (via synth). (googleapis#7468)
1 parent babd016 commit f14fed9

File tree

5 files changed

+124
-62
lines changed

5 files changed

+124
-62
lines changed

language/google/cloud/language_v1/proto/language_service.proto

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,66 @@ option java_multiple_files = true;
2323
option java_outer_classname = "LanguageServiceProto";
2424
option java_package = "com.google.cloud.language.v1";
2525

26-
2726
// Provides text analysis operations such as sentiment analysis and entity
2827
// recognition.
2928
service LanguageService {
3029
// Analyzes the sentiment of the provided text.
31-
rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) {
32-
option (google.api.http) = { post: "/v1/documents:analyzeSentiment" body: "*" };
30+
rpc AnalyzeSentiment(AnalyzeSentimentRequest)
31+
returns (AnalyzeSentimentResponse) {
32+
option (google.api.http) = {
33+
post: "/v1/documents:analyzeSentiment"
34+
body: "*"
35+
};
3336
}
3437

3538
// Finds named entities (currently proper names and common nouns) in the text
3639
// along with entity types, salience, mentions for each entity, and
3740
// other properties.
38-
rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) {
39-
option (google.api.http) = { post: "/v1/documents:analyzeEntities" body: "*" };
41+
rpc AnalyzeEntities(AnalyzeEntitiesRequest)
42+
returns (AnalyzeEntitiesResponse) {
43+
option (google.api.http) = {
44+
post: "/v1/documents:analyzeEntities"
45+
body: "*"
46+
};
4047
}
4148

42-
// Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes
43-
// sentiment associated with each entity and its mentions.
44-
rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) {
45-
option (google.api.http) = { post: "/v1/documents:analyzeEntitySentiment" body: "*" };
49+
// Finds entities, similar to
50+
// [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
51+
// in the text and analyzes sentiment associated with each entity and its
52+
// mentions.
53+
rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest)
54+
returns (AnalyzeEntitySentimentResponse) {
55+
option (google.api.http) = {
56+
post: "/v1/documents:analyzeEntitySentiment"
57+
body: "*"
58+
};
4659
}
4760

4861
// Analyzes the syntax of the text and provides sentence boundaries and
4962
// tokenization along with part of speech tags, dependency trees, and other
5063
// properties.
5164
rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) {
52-
option (google.api.http) = { post: "/v1/documents:analyzeSyntax" body: "*" };
65+
option (google.api.http) = {
66+
post: "/v1/documents:analyzeSyntax"
67+
body: "*"
68+
};
5369
}
5470

5571
// Classifies a document into categories.
5672
rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) {
57-
option (google.api.http) = { post: "/v1/documents:classifyText" body: "*" };
73+
option (google.api.http) = {
74+
post: "/v1/documents:classifyText"
75+
body: "*"
76+
};
5877
}
5978

6079
// A convenience method that provides all the features that analyzeSentiment,
6180
// analyzeEntities, and analyzeSyntax provide in one call.
6281
rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) {
63-
option (google.api.http) = { post: "/v1/documents:annotateText" body: "*" };
82+
option (google.api.http) = {
83+
post: "/v1/documents:annotateText"
84+
body: "*"
85+
};
6486
}
6587
}
6688

@@ -114,8 +136,8 @@ message Sentence {
114136
TextSpan text = 1;
115137

116138
// For calls to [AnalyzeSentiment][] or if
117-
// [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
118-
// true, this field will contain the sentiment for the sentence.
139+
// [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
140+
// is set to true, this field will contain the sentiment for the sentence.
119141
Sentiment sentiment = 2;
120142
}
121143

@@ -175,9 +197,9 @@ message Entity {
175197
repeated EntityMention mentions = 5;
176198

177199
// For calls to [AnalyzeEntitySentiment][] or if
178-
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
179-
// true, this field will contain the aggregate sentiment expressed for this
180-
// entity in the provided document.
200+
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment]
201+
// is set to true, this field will contain the aggregate sentiment expressed
202+
// for this entity in the provided document.
181203
Sentiment sentiment = 6;
182204
}
183205

@@ -828,9 +850,9 @@ message EntityMention {
828850
Type type = 2;
829851

830852
// For calls to [AnalyzeEntitySentiment][] or if
831-
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
832-
// true, this field will contain the sentiment expressed for this mention of
833-
// the entity in the provided document.
853+
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment]
854+
// is set to true, this field will contain the sentiment expressed for this
855+
// mention of the entity in the provided document.
834856
Sentiment sentiment = 3;
835857
}
836858

@@ -840,7 +862,9 @@ message TextSpan {
840862
string content = 1;
841863

842864
// The API calculates the beginning offset of the content in the original
843-
// document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request.
865+
// document according to the
866+
// [EncodingType][google.cloud.language.v1.EncodingType] specified in the API
867+
// request.
844868
int32 begin_offset = 2;
845869
}
846870

@@ -870,7 +894,8 @@ message AnalyzeSentimentResponse {
870894

871895
// The language of the text, which will be the same as the language specified
872896
// in the request or, if not specified, the automatically-detected language.
873-
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
897+
// See [Document.language][google.cloud.language.v1.Document.language] field
898+
// for more details.
874899
string language = 2;
875900

876901
// The sentiment for all the sentences in the document.
@@ -893,7 +918,8 @@ message AnalyzeEntitySentimentResponse {
893918

894919
// The language of the text, which will be the same as the language specified
895920
// in the request or, if not specified, the automatically-detected language.
896-
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
921+
// See [Document.language][google.cloud.language.v1.Document.language] field
922+
// for more details.
897923
string language = 2;
898924
}
899925

@@ -913,7 +939,8 @@ message AnalyzeEntitiesResponse {
913939

914940
// The language of the text, which will be the same as the language specified
915941
// in the request or, if not specified, the automatically-detected language.
916-
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
942+
// See [Document.language][google.cloud.language.v1.Document.language] field
943+
// for more details.
917944
string language = 2;
918945
}
919946

@@ -936,7 +963,8 @@ message AnalyzeSyntaxResponse {
936963

937964
// The language of the text, which will be the same as the language specified
938965
// in the request or, if not specified, the automatically-detected language.
939-
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
966+
// See [Document.language][google.cloud.language.v1.Document.language] field
967+
// for more details.
940968
string language = 3;
941969
}
942970

@@ -1006,7 +1034,8 @@ message AnnotateTextResponse {
10061034

10071035
// The language of the text, which will be the same as the language specified
10081036
// in the request or, if not specified, the automatically-detected language.
1009-
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
1037+
// See [Document.language][google.cloud.language.v1.Document.language] field
1038+
// for more details.
10101039
string language = 5;
10111040

10121041
// Categories identified in the input document.

language/google/cloud/language_v1/proto/language_service_pb2_grpc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ def AnalyzeEntities(self, request, context):
7171
raise NotImplementedError("Method not implemented!")
7272

7373
def AnalyzeEntitySentiment(self, request, context):
74-
"""Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes
75-
sentiment associated with each entity and its mentions.
74+
"""Finds entities, similar to
75+
[AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
76+
in the text and analyzes sentiment associated with each entity and its
77+
mentions.
7678
"""
7779
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
7880
context.set_details("Method not implemented!")

language/google/cloud/language_v1beta2/proto/language_service.proto

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,66 @@ option java_multiple_files = true;
2626
option java_outer_classname = "LanguageServiceProto";
2727
option java_package = "com.google.cloud.language.v1beta2";
2828

29-
3029
// Provides text analysis operations such as sentiment analysis and entity
3130
// recognition.
3231
service LanguageService {
3332
// Analyzes the sentiment of the provided text.
34-
rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) {
35-
option (google.api.http) = { post: "/v1beta2/documents:analyzeSentiment" body: "*" };
33+
rpc AnalyzeSentiment(AnalyzeSentimentRequest)
34+
returns (AnalyzeSentimentResponse) {
35+
option (google.api.http) = {
36+
post: "/v1beta2/documents:analyzeSentiment"
37+
body: "*"
38+
};
3639
}
3740

3841
// Finds named entities (currently proper names and common nouns) in the text
3942
// along with entity types, salience, mentions for each entity, and
4043
// other properties.
41-
rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) {
42-
option (google.api.http) = { post: "/v1beta2/documents:analyzeEntities" body: "*" };
44+
rpc AnalyzeEntities(AnalyzeEntitiesRequest)
45+
returns (AnalyzeEntitiesResponse) {
46+
option (google.api.http) = {
47+
post: "/v1beta2/documents:analyzeEntities"
48+
body: "*"
49+
};
4350
}
4451

45-
// Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes
46-
// sentiment associated with each entity and its mentions.
47-
rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) {
48-
option (google.api.http) = { post: "/v1beta2/documents:analyzeEntitySentiment" body: "*" };
52+
// Finds entities, similar to
53+
// [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities]
54+
// in the text and analyzes sentiment associated with each entity and its
55+
// mentions.
56+
rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest)
57+
returns (AnalyzeEntitySentimentResponse) {
58+
option (google.api.http) = {
59+
post: "/v1beta2/documents:analyzeEntitySentiment"
60+
body: "*"
61+
};
4962
}
5063

5164
// Analyzes the syntax of the text and provides sentence boundaries and
5265
// tokenization along with part of speech tags, dependency trees, and other
5366
// properties.
5467
rpc AnalyzeSyntax(AnalyzeSyntaxRequest) returns (AnalyzeSyntaxResponse) {
55-
option (google.api.http) = { post: "/v1beta2/documents:analyzeSyntax" body: "*" };
68+
option (google.api.http) = {
69+
post: "/v1beta2/documents:analyzeSyntax"
70+
body: "*"
71+
};
5672
}
5773

5874
// Classifies a document into categories.
5975
rpc ClassifyText(ClassifyTextRequest) returns (ClassifyTextResponse) {
60-
option (google.api.http) = { post: "/v1beta2/documents:classifyText" body: "*" };
76+
option (google.api.http) = {
77+
post: "/v1beta2/documents:classifyText"
78+
body: "*"
79+
};
6180
}
6281

6382
// A convenience method that provides all syntax, sentiment, entity, and
6483
// classification features in one call.
6584
rpc AnnotateText(AnnotateTextRequest) returns (AnnotateTextResponse) {
66-
option (google.api.http) = { post: "/v1beta2/documents:annotateText" body: "*" };
85+
option (google.api.http) = {
86+
post: "/v1beta2/documents:annotateText"
87+
body: "*"
88+
};
6789
}
6890
}
6991

@@ -117,8 +139,8 @@ message Sentence {
117139
TextSpan text = 1;
118140

119141
// For calls to [AnalyzeSentiment][] or if
120-
// [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to
121-
// true, this field will contain the sentiment for the sentence.
142+
// [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]
143+
// is set to true, this field will contain the sentiment for the sentence.
122144
Sentiment sentiment = 2;
123145
}
124146

@@ -178,9 +200,9 @@ message Entity {
178200
repeated EntityMention mentions = 5;
179201

180202
// For calls to [AnalyzeEntitySentiment][] or if
181-
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
182-
// true, this field will contain the aggregate sentiment expressed for this
183-
// entity in the provided document.
203+
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment]
204+
// is set to true, this field will contain the aggregate sentiment expressed
205+
// for this entity in the provided document.
184206
Sentiment sentiment = 6;
185207
}
186208

@@ -827,9 +849,9 @@ message EntityMention {
827849
Type type = 2;
828850

829851
// For calls to [AnalyzeEntitySentiment][] or if
830-
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
831-
// true, this field will contain the sentiment expressed for this mention of
832-
// the entity in the provided document.
852+
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment]
853+
// is set to true, this field will contain the sentiment expressed for this
854+
// mention of the entity in the provided document.
833855
Sentiment sentiment = 3;
834856
}
835857

@@ -839,7 +861,9 @@ message TextSpan {
839861
string content = 1;
840862

841863
// The API calculates the beginning offset of the content in the original
842-
// document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request.
864+
// document according to the
865+
// [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the
866+
// API request.
843867
int32 begin_offset = 2;
844868
}
845869

@@ -870,7 +894,8 @@ message AnalyzeSentimentResponse {
870894

871895
// The language of the text, which will be the same as the language specified
872896
// in the request or, if not specified, the automatically-detected language.
873-
// See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
897+
// See [Document.language][google.cloud.language.v1beta2.Document.language]
898+
// field for more details.
874899
string language = 2;
875900

876901
// The sentiment for all the sentences in the document.
@@ -893,7 +918,8 @@ message AnalyzeEntitySentimentResponse {
893918

894919
// The language of the text, which will be the same as the language specified
895920
// in the request or, if not specified, the automatically-detected language.
896-
// See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
921+
// See [Document.language][google.cloud.language.v1beta2.Document.language]
922+
// field for more details.
897923
string language = 2;
898924
}
899925

@@ -913,7 +939,8 @@ message AnalyzeEntitiesResponse {
913939

914940
// The language of the text, which will be the same as the language specified
915941
// in the request or, if not specified, the automatically-detected language.
916-
// See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
942+
// See [Document.language][google.cloud.language.v1beta2.Document.language]
943+
// field for more details.
917944
string language = 2;
918945
}
919946

@@ -936,7 +963,8 @@ message AnalyzeSyntaxResponse {
936963

937964
// The language of the text, which will be the same as the language specified
938965
// in the request or, if not specified, the automatically-detected language.
939-
// See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
966+
// See [Document.language][google.cloud.language.v1beta2.Document.language]
967+
// field for more details.
940968
string language = 3;
941969
}
942970

@@ -1006,7 +1034,8 @@ message AnnotateTextResponse {
10061034

10071035
// The language of the text, which will be the same as the language specified
10081036
// in the request or, if not specified, the automatically-detected language.
1009-
// See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
1037+
// See [Document.language][google.cloud.language.v1beta2.Document.language]
1038+
// field for more details.
10101039
string language = 5;
10111040

10121041
// Categories identified in the input document.

language/google/cloud/language_v1beta2/proto/language_service_pb2_grpc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ def AnalyzeEntities(self, request, context):
7171
raise NotImplementedError("Method not implemented!")
7272

7373
def AnalyzeEntitySentiment(self, request, context):
74-
"""Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes
75-
sentiment associated with each entity and its mentions.
74+
"""Finds entities, similar to
75+
[AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities]
76+
in the text and analyzes sentiment associated with each entity and its
77+
mentions.
7678
"""
7779
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
7880
context.set_details("Method not implemented!")

0 commit comments

Comments
 (0)