Skip to content

Commit

Permalink
Run make gen-all-sdk-grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerlynn committed Aug 1, 2023
1 parent 6de87b7 commit 8ec6209
Show file tree
Hide file tree
Showing 9 changed files with 1,548 additions and 260 deletions.
391 changes: 238 additions & 153 deletions pkg/sdk/sdk.pb.go

Large diffs are not rendered by default.

352 changes: 346 additions & 6 deletions sdks/cpp/include/agones/sdk.pb.h

Large diffs are not rendered by default.

439 changes: 379 additions & 60 deletions sdks/cpp/src/agones/sdk.pb.cc

Large diffs are not rendered by default.

335 changes: 295 additions & 40 deletions sdks/csharp/sdk/generated/Sdk.cs

Large diffs are not rendered by default.

237 changes: 236 additions & 1 deletion sdks/nodejs/lib/sdk_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ goog.exportSymbol('proto.agones.dev.sdk.GameServer.ObjectMeta', null, global);
goog.exportSymbol('proto.agones.dev.sdk.GameServer.Spec', null, global);
goog.exportSymbol('proto.agones.dev.sdk.GameServer.Spec.Health', null, global);
goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status', null, global);
goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status.Address', null, global);
goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status.CounterStatus', null, global);
goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status.ListStatus', null, global);
goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status.PlayerStatus', null, global);
Expand Down Expand Up @@ -214,6 +215,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.agones.dev.sdk.GameServer.Status.displayName = 'proto.agones.dev.sdk.GameServer.Status';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.agones.dev.sdk.GameServer.Status.Address = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.agones.dev.sdk.GameServer.Status.Address, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.agones.dev.sdk.GameServer.Status.Address.displayName = 'proto.agones.dev.sdk.GameServer.Status.Address';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
Expand Down Expand Up @@ -1584,7 +1606,7 @@ proto.agones.dev.sdk.GameServer.Spec.prototype.hasHealth = function() {
* @private {!Array<number>}
* @const
*/
proto.agones.dev.sdk.GameServer.Status.repeatedFields_ = [3];
proto.agones.dev.sdk.GameServer.Status.repeatedFields_ = [7,3];



Expand Down Expand Up @@ -1619,6 +1641,8 @@ proto.agones.dev.sdk.GameServer.Status.toObject = function(includeInstance, msg)
var f, obj = {
state: jspb.Message.getFieldWithDefault(msg, 1, ""),
address: jspb.Message.getFieldWithDefault(msg, 2, ""),
addressesList: jspb.Message.toObjectList(msg.getAddressesList(),
proto.agones.dev.sdk.GameServer.Status.Address.toObject, includeInstance),
portsList: jspb.Message.toObjectList(msg.getPortsList(),
proto.agones.dev.sdk.GameServer.Status.Port.toObject, includeInstance),
players: (f = msg.getPlayers()) && proto.agones.dev.sdk.GameServer.Status.PlayerStatus.toObject(includeInstance, f),
Expand Down Expand Up @@ -1668,6 +1692,11 @@ proto.agones.dev.sdk.GameServer.Status.deserializeBinaryFromReader = function(ms
var value = /** @type {string} */ (reader.readString());
msg.setAddress(value);
break;
case 7:
var value = new proto.agones.dev.sdk.GameServer.Status.Address;
reader.readMessage(value,proto.agones.dev.sdk.GameServer.Status.Address.deserializeBinaryFromReader);
msg.addAddresses(value);
break;
case 3:
var value = new proto.agones.dev.sdk.GameServer.Status.Port;
reader.readMessage(value,proto.agones.dev.sdk.GameServer.Status.Port.deserializeBinaryFromReader);
Expand Down Expand Up @@ -1733,6 +1762,14 @@ proto.agones.dev.sdk.GameServer.Status.serializeBinaryToWriter = function(messag
f
);
}
f = message.getAddressesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
7,
f,
proto.agones.dev.sdk.GameServer.Status.Address.serializeBinaryToWriter
);
}
f = message.getPortsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
Expand Down Expand Up @@ -1763,6 +1800,166 @@ proto.agones.dev.sdk.GameServer.Status.serializeBinaryToWriter = function(messag



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.agones.dev.sdk.GameServer.Status.Address.prototype.toObject = function(opt_includeInstance) {
return proto.agones.dev.sdk.GameServer.Status.Address.toObject(opt_includeInstance, this);
};


/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.agones.dev.sdk.GameServer.Status.Address} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.agones.dev.sdk.GameServer.Status.Address.toObject = function(includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
address: jspb.Message.getFieldWithDefault(msg, 2, "")
};

if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}


/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.agones.dev.sdk.GameServer.Status.Address}
*/
proto.agones.dev.sdk.GameServer.Status.Address.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.agones.dev.sdk.GameServer.Status.Address;
return proto.agones.dev.sdk.GameServer.Status.Address.deserializeBinaryFromReader(msg, reader);
};


/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.agones.dev.sdk.GameServer.Status.Address} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.agones.dev.sdk.GameServer.Status.Address}
*/
proto.agones.dev.sdk.GameServer.Status.Address.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setAddress(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};


/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.agones.dev.sdk.GameServer.Status.Address.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.agones.dev.sdk.GameServer.Status.Address.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};


/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.agones.dev.sdk.GameServer.Status.Address} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.agones.dev.sdk.GameServer.Status.Address.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};


/**
* optional string type = 1;
* @return {string}
*/
proto.agones.dev.sdk.GameServer.Status.Address.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
* @param {string} value
* @return {!proto.agones.dev.sdk.GameServer.Status.Address} returns this
*/
proto.agones.dev.sdk.GameServer.Status.Address.prototype.setType = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};


/**
* optional string address = 2;
* @return {string}
*/
proto.agones.dev.sdk.GameServer.Status.Address.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
* @param {string} value
* @return {!proto.agones.dev.sdk.GameServer.Status.Address} returns this
*/
proto.agones.dev.sdk.GameServer.Status.Address.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
Expand Down Expand Up @@ -2518,6 +2715,44 @@ proto.agones.dev.sdk.GameServer.Status.prototype.setAddress = function(value) {
};


/**
* repeated Address addresses = 7;
* @return {!Array<!proto.agones.dev.sdk.GameServer.Status.Address>}
*/
proto.agones.dev.sdk.GameServer.Status.prototype.getAddressesList = function() {
return /** @type{!Array<!proto.agones.dev.sdk.GameServer.Status.Address>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.agones.dev.sdk.GameServer.Status.Address, 7));
};


/**
* @param {!Array<!proto.agones.dev.sdk.GameServer.Status.Address>} value
* @return {!proto.agones.dev.sdk.GameServer.Status} returns this
*/
proto.agones.dev.sdk.GameServer.Status.prototype.setAddressesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 7, value);
};


/**
* @param {!proto.agones.dev.sdk.GameServer.Status.Address=} opt_value
* @param {number=} opt_index
* @return {!proto.agones.dev.sdk.GameServer.Status.Address}
*/
proto.agones.dev.sdk.GameServer.Status.prototype.addAddresses = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.agones.dev.sdk.GameServer.Status.Address, opt_index);
};


/**
* Clears the list making it empty but non-null.
* @return {!proto.agones.dev.sdk.GameServer.Status} returns this
*/
proto.agones.dev.sdk.GameServer.Status.prototype.clearAddressesList = function() {
return this.setAddressesList([]);
};


/**
* repeated Port ports = 3;
* @return {!Array<!proto.agones.dev.sdk.GameServer.Status.Port>}
Expand Down
6 changes: 6 additions & 0 deletions sdks/rust/proto/sdk/sdk.proto
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ message GameServer {
}

message Status {
message Address {
string type = 1;
string address = 2;
}

message Port {
string name = 1;
int32 port = 2;
Expand Down Expand Up @@ -178,6 +183,7 @@ message GameServer {

string state = 1;
string address = 2;
repeated Address addresses = 7;
repeated Port ports = 3;

// [Stage:Alpha]
Expand Down
18 changes: 18 additions & 0 deletions sdks/swagger/sdk.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,17 @@
}
}
},
"StatusAddress": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"address": {
"type": "string"
}
}
},
"StatusCounterStatus": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -427,6 +438,13 @@
"address": {
"type": "string"
},
"addresses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/StatusAddress"
}
},
"ports": {
"type": "array",
"items": {
Expand Down
1 change: 1 addition & 0 deletions test/sdk/restapi/swagger/model_sdk_game_server_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ package swagger
type SdkGameServerStatus struct {
State string `json:"state,omitempty"`
Address string `json:"address,omitempty"`
Addresses []StatusAddress `json:"addresses,omitempty"`
Ports []StatusPort `json:"ports,omitempty"`
Players *StatusPlayerStatus `json:"players,omitempty"`
Counters map[string]StatusCounterStatus `json:"counters,omitempty"`
Expand Down
29 changes: 29 additions & 0 deletions test/sdk/restapi/swagger/model_status_address.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2022 Google LLC All Rights Reserved.
//
// 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.

// This code was autogenerated. Do not edit directly.
/*
* sdk.proto
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package swagger

type StatusAddress struct {
Type_ string `json:"type,omitempty"`
Address string `json:"address,omitempty"`
}

0 comments on commit 8ec6209

Please sign in to comment.