@lansweeper/policies-grpc 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gen-proto/image.json +1 -0
- package/gen-proto/index.d.ts +2 -0
- package/gen-proto/index.js +3 -0
- package/gen-proto/policies_grpc_pb.d.ts +41 -0
- package/gen-proto/policies_grpc_pb.js +44 -0
- package/gen-proto/policies_pb.d.ts +109 -0
- package/gen-proto/policies_pb.js +816 -0
- package/package.json +20 -0
- package/proto/policies.proto +34 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":[{"name":"proto/policies.proto","package":"lansweeper.policies.v1","messageType":[{"name":"Policy","field":[{"name":"send_each_time_in_minutes","number":1,"label":"LABEL_OPTIONAL","type":"TYPE_INT32","jsonName":"sendEachTimeInMinutes"},{"name":"policy_type","number":2,"label":"LABEL_OPTIONAL","type":"TYPE_ENUM","typeName":".lansweeper.policies.v1.PolicyType","jsonName":"policyType"}]},{"name":"ContextPolicy","field":[{"name":"context","number":1,"label":"LABEL_OPTIONAL","type":"TYPE_STRING","jsonName":"context"},{"name":"policies","number":2,"label":"LABEL_REPEATED","type":"TYPE_MESSAGE","typeName":".lansweeper.policies.v1.Policy","jsonName":"policies"}]},{"name":"GetInstallationPolicyRequest","field":[{"name":"site_id","number":1,"label":"LABEL_OPTIONAL","type":"TYPE_STRING","jsonName":"siteId"},{"name":"install_key","number":2,"label":"LABEL_OPTIONAL","type":"TYPE_STRING","jsonName":"installKey"}]},{"name":"GetInstallationPolicyResponse","field":[{"name":"installation_policy_type","number":1,"label":"LABEL_OPTIONAL","type":"TYPE_STRING","jsonName":"installationPolicyType"},{"name":"context_policies","number":2,"label":"LABEL_REPEATED","type":"TYPE_MESSAGE","typeName":".lansweeper.policies.v1.ContextPolicy","jsonName":"contextPolicies"}]}],"enumType":[{"name":"PolicyType","value":[{"name":"POLICY_1","number":0},{"name":"POLICY_2","number":1},{"name":"POLICY_3","number":2}]}],"service":[{"name":"PoliciesService","method":[{"name":"GetInstallationPolicy","inputType":".lansweeper.policies.v1.GetInstallationPolicyRequest","outputType":".lansweeper.policies.v1.GetInstallationPolicyResponse","options":{}}]}],"sourceCodeInfo":{"location":[{"span":[0,0,32,1]},{"path":[12],"span":[0,0,18]},{"path":[2],"span":[2,0,31]},{"path":[5,0],"span":[4,0,8,1]},{"path":[5,0,1],"span":[4,5,15]},{"path":[5,0,2,0],"span":[5,4,17]},{"path":[5,0,2,0,1],"span":[5,4,12]},{"path":[5,0,2,0,2],"span":[5,15,16]},{"path":[5,0,2,1],"span":[6,4,17]},{"path":[5,0,2,1,1],"span":[6,4,12]},{"path":[5,0,2,1,2],"span":[6,15,16]},{"path":[5,0,2,2],"span":[7,4,17]},{"path":[5,0,2,2,1],"span":[7,4,12]},{"path":[5,0,2,2,2],"span":[7,15,16]},{"path":[4,0],"span":[10,0,13,1]},{"path":[4,0,1],"span":[10,8,14]},{"path":[4,0,2,0],"span":[11,4,40]},{"path":[4,0,2,0,5],"span":[11,4,9]},{"path":[4,0,2,0,1],"span":[11,10,35]},{"path":[4,0,2,0,3],"span":[11,38,39]},{"path":[4,0,2,1],"span":[12,4,31]},{"path":[4,0,2,1,6],"span":[12,4,14]},{"path":[4,0,2,1,1],"span":[12,15,26]},{"path":[4,0,2,1,3],"span":[12,29,30]},{"path":[4,1],"span":[15,0,18,1]},{"path":[4,1,1],"span":[15,8,21]},{"path":[4,1,2,0],"span":[16,4,23]},{"path":[4,1,2,0,5],"span":[16,4,10]},{"path":[4,1,2,0,1],"span":[16,11,18]},{"path":[4,1,2,0,3],"span":[16,21,22]},{"path":[4,1,2,1],"span":[17,4,33]},{"path":[4,1,2,1,4],"span":[17,4,12]},{"path":[4,1,2,1,6],"span":[17,13,19]},{"path":[4,1,2,1,1],"span":[17,20,28]},{"path":[4,1,2,1,3],"span":[17,31,32]},{"path":[4,2],"span":[20,0,23,1]},{"path":[4,2,1],"span":[20,8,36]},{"path":[4,2,2,0],"span":[21,4,23]},{"path":[4,2,2,0,5],"span":[21,4,10]},{"path":[4,2,2,0,1],"span":[21,11,18]},{"path":[4,2,2,0,3],"span":[21,21,22]},{"path":[4,2,2,1],"span":[22,4,27]},{"path":[4,2,2,1,5],"span":[22,4,10]},{"path":[4,2,2,1,1],"span":[22,11,22]},{"path":[4,2,2,1,3],"span":[22,25,26]},{"path":[4,3],"span":[25,0,28,1]},{"path":[4,3,1],"span":[25,8,37]},{"path":[4,3,2,0],"span":[26,4,40]},{"path":[4,3,2,0,5],"span":[26,4,10]},{"path":[4,3,2,0,1],"span":[26,11,35]},{"path":[4,3,2,0,3],"span":[26,38,39]},{"path":[4,3,2,1],"span":[27,4,48]},{"path":[4,3,2,1,4],"span":[27,4,12]},{"path":[4,3,2,1,6],"span":[27,13,26]},{"path":[4,3,2,1,1],"span":[27,27,43]},{"path":[4,3,2,1,3],"span":[27,46,47]},{"path":[6,0],"span":[30,0,32,1]},{"path":[6,0,1],"span":[30,8,23]},{"path":[6,0,2,0],"span":[31,4,102]},{"path":[6,0,2,0,1],"span":[31,8,29]},{"path":[6,0,2,0,2],"span":[31,30,58]},{"path":[6,0,2,0,3],"span":[31,69,98]}]},"syntax":"proto3","bufExtension":{"isImport":false,"isSyntaxUnspecified":false}}]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// package: lansweeper.policies.v1
|
|
2
|
+
// file: policies.proto
|
|
3
|
+
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
|
|
7
|
+
import * as grpc from "@grpc/grpc-js";
|
|
8
|
+
import * as policies_pb from "./policies_pb";
|
|
9
|
+
|
|
10
|
+
interface IPoliciesServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
|
11
|
+
getInstallationPolicy: IPoliciesServiceService_IGetInstallationPolicy;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface IPoliciesServiceService_IGetInstallationPolicy extends grpc.MethodDefinition<policies_pb.GetInstallationPolicyRequest, policies_pb.GetInstallationPolicyResponse> {
|
|
15
|
+
path: "/lansweeper.policies.v1.PoliciesService/GetInstallationPolicy";
|
|
16
|
+
requestStream: false;
|
|
17
|
+
responseStream: false;
|
|
18
|
+
requestSerialize: grpc.serialize<policies_pb.GetInstallationPolicyRequest>;
|
|
19
|
+
requestDeserialize: grpc.deserialize<policies_pb.GetInstallationPolicyRequest>;
|
|
20
|
+
responseSerialize: grpc.serialize<policies_pb.GetInstallationPolicyResponse>;
|
|
21
|
+
responseDeserialize: grpc.deserialize<policies_pb.GetInstallationPolicyResponse>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const PoliciesServiceService: IPoliciesServiceService;
|
|
25
|
+
|
|
26
|
+
export interface IPoliciesServiceServer extends grpc.UntypedServiceImplementation {
|
|
27
|
+
getInstallationPolicy: grpc.handleUnaryCall<policies_pb.GetInstallationPolicyRequest, policies_pb.GetInstallationPolicyResponse>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface IPoliciesServiceClient {
|
|
31
|
+
getInstallationPolicy(request: policies_pb.GetInstallationPolicyRequest, callback: (error: grpc.ServiceError | null, response: policies_pb.GetInstallationPolicyResponse) => void): grpc.ClientUnaryCall;
|
|
32
|
+
getInstallationPolicy(request: policies_pb.GetInstallationPolicyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: policies_pb.GetInstallationPolicyResponse) => void): grpc.ClientUnaryCall;
|
|
33
|
+
getInstallationPolicy(request: policies_pb.GetInstallationPolicyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: policies_pb.GetInstallationPolicyResponse) => void): grpc.ClientUnaryCall;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class PoliciesServiceClient extends grpc.Client implements IPoliciesServiceClient {
|
|
37
|
+
constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
|
|
38
|
+
public getInstallationPolicy(request: policies_pb.GetInstallationPolicyRequest, callback: (error: grpc.ServiceError | null, response: policies_pb.GetInstallationPolicyResponse) => void): grpc.ClientUnaryCall;
|
|
39
|
+
public getInstallationPolicy(request: policies_pb.GetInstallationPolicyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: policies_pb.GetInstallationPolicyResponse) => void): grpc.ClientUnaryCall;
|
|
40
|
+
public getInstallationPolicy(request: policies_pb.GetInstallationPolicyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: policies_pb.GetInstallationPolicyResponse) => void): grpc.ClientUnaryCall;
|
|
41
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
var grpc = require('@grpc/grpc-js');
|
|
5
|
+
var policies_pb = require('./policies_pb.js');
|
|
6
|
+
|
|
7
|
+
function serialize_lansweeper_policies_v1_GetInstallationPolicyRequest(arg) {
|
|
8
|
+
if (!(arg instanceof policies_pb.GetInstallationPolicyRequest)) {
|
|
9
|
+
throw new Error('Expected argument of type lansweeper.policies.v1.GetInstallationPolicyRequest');
|
|
10
|
+
}
|
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function deserialize_lansweeper_policies_v1_GetInstallationPolicyRequest(buffer_arg) {
|
|
15
|
+
return policies_pb.GetInstallationPolicyRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function serialize_lansweeper_policies_v1_GetInstallationPolicyResponse(arg) {
|
|
19
|
+
if (!(arg instanceof policies_pb.GetInstallationPolicyResponse)) {
|
|
20
|
+
throw new Error('Expected argument of type lansweeper.policies.v1.GetInstallationPolicyResponse');
|
|
21
|
+
}
|
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function deserialize_lansweeper_policies_v1_GetInstallationPolicyResponse(buffer_arg) {
|
|
26
|
+
return policies_pb.GetInstallationPolicyResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
var PoliciesServiceService = exports.PoliciesServiceService = {
|
|
31
|
+
getInstallationPolicy: {
|
|
32
|
+
path: '/lansweeper.policies.v1.PoliciesService/GetInstallationPolicy',
|
|
33
|
+
requestStream: false,
|
|
34
|
+
responseStream: false,
|
|
35
|
+
requestType: policies_pb.GetInstallationPolicyRequest,
|
|
36
|
+
responseType: policies_pb.GetInstallationPolicyResponse,
|
|
37
|
+
requestSerialize: serialize_lansweeper_policies_v1_GetInstallationPolicyRequest,
|
|
38
|
+
requestDeserialize: deserialize_lansweeper_policies_v1_GetInstallationPolicyRequest,
|
|
39
|
+
responseSerialize: serialize_lansweeper_policies_v1_GetInstallationPolicyResponse,
|
|
40
|
+
responseDeserialize: deserialize_lansweeper_policies_v1_GetInstallationPolicyResponse,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.PoliciesServiceClient = grpc.makeGenericClientConstructor(PoliciesServiceService);
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// package: lansweeper.policies.v1
|
|
2
|
+
// file: policies.proto
|
|
3
|
+
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
|
|
7
|
+
import * as jspb from "google-protobuf";
|
|
8
|
+
|
|
9
|
+
export class Policy extends jspb.Message {
|
|
10
|
+
getSendEachTimeInMinutes(): number;
|
|
11
|
+
setSendEachTimeInMinutes(value: number): Policy;
|
|
12
|
+
getPolicyType(): PolicyType;
|
|
13
|
+
setPolicyType(value: PolicyType): Policy;
|
|
14
|
+
|
|
15
|
+
serializeBinary(): Uint8Array;
|
|
16
|
+
toObject(includeInstance?: boolean): Policy.AsObject;
|
|
17
|
+
static toObject(includeInstance: boolean, msg: Policy): Policy.AsObject;
|
|
18
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
19
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
20
|
+
static serializeBinaryToWriter(message: Policy, writer: jspb.BinaryWriter): void;
|
|
21
|
+
static deserializeBinary(bytes: Uint8Array): Policy;
|
|
22
|
+
static deserializeBinaryFromReader(message: Policy, reader: jspb.BinaryReader): Policy;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export namespace Policy {
|
|
26
|
+
export type AsObject = {
|
|
27
|
+
sendEachTimeInMinutes: number,
|
|
28
|
+
policyType: PolicyType,
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class ContextPolicy extends jspb.Message {
|
|
33
|
+
getContext(): string;
|
|
34
|
+
setContext(value: string): ContextPolicy;
|
|
35
|
+
clearPoliciesList(): void;
|
|
36
|
+
getPoliciesList(): Array<Policy>;
|
|
37
|
+
setPoliciesList(value: Array<Policy>): ContextPolicy;
|
|
38
|
+
addPolicies(value?: Policy, index?: number): Policy;
|
|
39
|
+
|
|
40
|
+
serializeBinary(): Uint8Array;
|
|
41
|
+
toObject(includeInstance?: boolean): ContextPolicy.AsObject;
|
|
42
|
+
static toObject(includeInstance: boolean, msg: ContextPolicy): ContextPolicy.AsObject;
|
|
43
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
44
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
45
|
+
static serializeBinaryToWriter(message: ContextPolicy, writer: jspb.BinaryWriter): void;
|
|
46
|
+
static deserializeBinary(bytes: Uint8Array): ContextPolicy;
|
|
47
|
+
static deserializeBinaryFromReader(message: ContextPolicy, reader: jspb.BinaryReader): ContextPolicy;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export namespace ContextPolicy {
|
|
51
|
+
export type AsObject = {
|
|
52
|
+
context: string,
|
|
53
|
+
policiesList: Array<Policy.AsObject>,
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export class GetInstallationPolicyRequest extends jspb.Message {
|
|
58
|
+
getSiteId(): string;
|
|
59
|
+
setSiteId(value: string): GetInstallationPolicyRequest;
|
|
60
|
+
getInstallKey(): string;
|
|
61
|
+
setInstallKey(value: string): GetInstallationPolicyRequest;
|
|
62
|
+
|
|
63
|
+
serializeBinary(): Uint8Array;
|
|
64
|
+
toObject(includeInstance?: boolean): GetInstallationPolicyRequest.AsObject;
|
|
65
|
+
static toObject(includeInstance: boolean, msg: GetInstallationPolicyRequest): GetInstallationPolicyRequest.AsObject;
|
|
66
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
67
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
68
|
+
static serializeBinaryToWriter(message: GetInstallationPolicyRequest, writer: jspb.BinaryWriter): void;
|
|
69
|
+
static deserializeBinary(bytes: Uint8Array): GetInstallationPolicyRequest;
|
|
70
|
+
static deserializeBinaryFromReader(message: GetInstallationPolicyRequest, reader: jspb.BinaryReader): GetInstallationPolicyRequest;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export namespace GetInstallationPolicyRequest {
|
|
74
|
+
export type AsObject = {
|
|
75
|
+
siteId: string,
|
|
76
|
+
installKey: string,
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export class GetInstallationPolicyResponse extends jspb.Message {
|
|
81
|
+
getInstallationPolicyType(): string;
|
|
82
|
+
setInstallationPolicyType(value: string): GetInstallationPolicyResponse;
|
|
83
|
+
clearContextPoliciesList(): void;
|
|
84
|
+
getContextPoliciesList(): Array<ContextPolicy>;
|
|
85
|
+
setContextPoliciesList(value: Array<ContextPolicy>): GetInstallationPolicyResponse;
|
|
86
|
+
addContextPolicies(value?: ContextPolicy, index?: number): ContextPolicy;
|
|
87
|
+
|
|
88
|
+
serializeBinary(): Uint8Array;
|
|
89
|
+
toObject(includeInstance?: boolean): GetInstallationPolicyResponse.AsObject;
|
|
90
|
+
static toObject(includeInstance: boolean, msg: GetInstallationPolicyResponse): GetInstallationPolicyResponse.AsObject;
|
|
91
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
92
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
93
|
+
static serializeBinaryToWriter(message: GetInstallationPolicyResponse, writer: jspb.BinaryWriter): void;
|
|
94
|
+
static deserializeBinary(bytes: Uint8Array): GetInstallationPolicyResponse;
|
|
95
|
+
static deserializeBinaryFromReader(message: GetInstallationPolicyResponse, reader: jspb.BinaryReader): GetInstallationPolicyResponse;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export namespace GetInstallationPolicyResponse {
|
|
99
|
+
export type AsObject = {
|
|
100
|
+
installationPolicyType: string,
|
|
101
|
+
contextPoliciesList: Array<ContextPolicy.AsObject>,
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export enum PolicyType {
|
|
106
|
+
POLICY_1 = 0,
|
|
107
|
+
POLICY_2 = 1,
|
|
108
|
+
POLICY_3 = 2,
|
|
109
|
+
}
|
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
// source: policies.proto
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview
|
|
4
|
+
* @enhanceable
|
|
5
|
+
* @suppress {missingRequire} reports error on implicit type usages.
|
|
6
|
+
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
7
|
+
* field starts with 'MSG_' and isn't a translatable message.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
11
|
+
/* eslint-disable */
|
|
12
|
+
// @ts-nocheck
|
|
13
|
+
|
|
14
|
+
var jspb = require('google-protobuf');
|
|
15
|
+
var goog = jspb;
|
|
16
|
+
var global = Function('return this')();
|
|
17
|
+
|
|
18
|
+
goog.exportSymbol('proto.lansweeper.policies.v1.ContextPolicy', null, global);
|
|
19
|
+
goog.exportSymbol('proto.lansweeper.policies.v1.GetInstallationPolicyRequest', null, global);
|
|
20
|
+
goog.exportSymbol('proto.lansweeper.policies.v1.GetInstallationPolicyResponse', null, global);
|
|
21
|
+
goog.exportSymbol('proto.lansweeper.policies.v1.Policy', null, global);
|
|
22
|
+
goog.exportSymbol('proto.lansweeper.policies.v1.PolicyType', null, global);
|
|
23
|
+
/**
|
|
24
|
+
* Generated by JsPbCodeGenerator.
|
|
25
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
26
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
27
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
28
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
29
|
+
* valid.
|
|
30
|
+
* @extends {jspb.Message}
|
|
31
|
+
* @constructor
|
|
32
|
+
*/
|
|
33
|
+
proto.lansweeper.policies.v1.Policy = function(opt_data) {
|
|
34
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
35
|
+
};
|
|
36
|
+
goog.inherits(proto.lansweeper.policies.v1.Policy, jspb.Message);
|
|
37
|
+
if (goog.DEBUG && !COMPILED) {
|
|
38
|
+
/**
|
|
39
|
+
* @public
|
|
40
|
+
* @override
|
|
41
|
+
*/
|
|
42
|
+
proto.lansweeper.policies.v1.Policy.displayName = 'proto.lansweeper.policies.v1.Policy';
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Generated by JsPbCodeGenerator.
|
|
46
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
47
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
48
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
49
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
50
|
+
* valid.
|
|
51
|
+
* @extends {jspb.Message}
|
|
52
|
+
* @constructor
|
|
53
|
+
*/
|
|
54
|
+
proto.lansweeper.policies.v1.ContextPolicy = function(opt_data) {
|
|
55
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.lansweeper.policies.v1.ContextPolicy.repeatedFields_, null);
|
|
56
|
+
};
|
|
57
|
+
goog.inherits(proto.lansweeper.policies.v1.ContextPolicy, jspb.Message);
|
|
58
|
+
if (goog.DEBUG && !COMPILED) {
|
|
59
|
+
/**
|
|
60
|
+
* @public
|
|
61
|
+
* @override
|
|
62
|
+
*/
|
|
63
|
+
proto.lansweeper.policies.v1.ContextPolicy.displayName = 'proto.lansweeper.policies.v1.ContextPolicy';
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Generated by JsPbCodeGenerator.
|
|
67
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
68
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
69
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
70
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
71
|
+
* valid.
|
|
72
|
+
* @extends {jspb.Message}
|
|
73
|
+
* @constructor
|
|
74
|
+
*/
|
|
75
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest = function(opt_data) {
|
|
76
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
77
|
+
};
|
|
78
|
+
goog.inherits(proto.lansweeper.policies.v1.GetInstallationPolicyRequest, jspb.Message);
|
|
79
|
+
if (goog.DEBUG && !COMPILED) {
|
|
80
|
+
/**
|
|
81
|
+
* @public
|
|
82
|
+
* @override
|
|
83
|
+
*/
|
|
84
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.displayName = 'proto.lansweeper.policies.v1.GetInstallationPolicyRequest';
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Generated by JsPbCodeGenerator.
|
|
88
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
89
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
90
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
91
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
92
|
+
* valid.
|
|
93
|
+
* @extends {jspb.Message}
|
|
94
|
+
* @constructor
|
|
95
|
+
*/
|
|
96
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse = function(opt_data) {
|
|
97
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.lansweeper.policies.v1.GetInstallationPolicyResponse.repeatedFields_, null);
|
|
98
|
+
};
|
|
99
|
+
goog.inherits(proto.lansweeper.policies.v1.GetInstallationPolicyResponse, jspb.Message);
|
|
100
|
+
if (goog.DEBUG && !COMPILED) {
|
|
101
|
+
/**
|
|
102
|
+
* @public
|
|
103
|
+
* @override
|
|
104
|
+
*/
|
|
105
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.displayName = 'proto.lansweeper.policies.v1.GetInstallationPolicyResponse';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
111
|
+
/**
|
|
112
|
+
* Creates an object representation of this proto.
|
|
113
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
114
|
+
* Optional fields that are not set will be set to undefined.
|
|
115
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
116
|
+
* For the list of reserved names please see:
|
|
117
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
118
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
119
|
+
* JSPB instance for transitional soy proto support:
|
|
120
|
+
* http://goto/soy-param-migration
|
|
121
|
+
* @return {!Object}
|
|
122
|
+
*/
|
|
123
|
+
proto.lansweeper.policies.v1.Policy.prototype.toObject = function(opt_includeInstance) {
|
|
124
|
+
return proto.lansweeper.policies.v1.Policy.toObject(opt_includeInstance, this);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Static version of the {@see toObject} method.
|
|
130
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
131
|
+
* the JSPB instance for transitional soy proto support:
|
|
132
|
+
* http://goto/soy-param-migration
|
|
133
|
+
* @param {!proto.lansweeper.policies.v1.Policy} msg The msg instance to transform.
|
|
134
|
+
* @return {!Object}
|
|
135
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
136
|
+
*/
|
|
137
|
+
proto.lansweeper.policies.v1.Policy.toObject = function(includeInstance, msg) {
|
|
138
|
+
var f, obj = {
|
|
139
|
+
sendEachTimeInMinutes: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
140
|
+
policyType: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
if (includeInstance) {
|
|
144
|
+
obj.$jspbMessageInstance = msg;
|
|
145
|
+
}
|
|
146
|
+
return obj;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Deserializes binary data (in protobuf wire format).
|
|
153
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
154
|
+
* @return {!proto.lansweeper.policies.v1.Policy}
|
|
155
|
+
*/
|
|
156
|
+
proto.lansweeper.policies.v1.Policy.deserializeBinary = function(bytes) {
|
|
157
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
158
|
+
var msg = new proto.lansweeper.policies.v1.Policy;
|
|
159
|
+
return proto.lansweeper.policies.v1.Policy.deserializeBinaryFromReader(msg, reader);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
165
|
+
* given reader into the given message object.
|
|
166
|
+
* @param {!proto.lansweeper.policies.v1.Policy} msg The message object to deserialize into.
|
|
167
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
168
|
+
* @return {!proto.lansweeper.policies.v1.Policy}
|
|
169
|
+
*/
|
|
170
|
+
proto.lansweeper.policies.v1.Policy.deserializeBinaryFromReader = function(msg, reader) {
|
|
171
|
+
while (reader.nextField()) {
|
|
172
|
+
if (reader.isEndGroup()) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
var field = reader.getFieldNumber();
|
|
176
|
+
switch (field) {
|
|
177
|
+
case 1:
|
|
178
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
179
|
+
msg.setSendEachTimeInMinutes(value);
|
|
180
|
+
break;
|
|
181
|
+
case 2:
|
|
182
|
+
var value = /** @type {!proto.lansweeper.policies.v1.PolicyType} */ (reader.readEnum());
|
|
183
|
+
msg.setPolicyType(value);
|
|
184
|
+
break;
|
|
185
|
+
default:
|
|
186
|
+
reader.skipField();
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return msg;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
196
|
+
* @return {!Uint8Array}
|
|
197
|
+
*/
|
|
198
|
+
proto.lansweeper.policies.v1.Policy.prototype.serializeBinary = function() {
|
|
199
|
+
var writer = new jspb.BinaryWriter();
|
|
200
|
+
proto.lansweeper.policies.v1.Policy.serializeBinaryToWriter(this, writer);
|
|
201
|
+
return writer.getResultBuffer();
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
207
|
+
* format), writing to the given BinaryWriter.
|
|
208
|
+
* @param {!proto.lansweeper.policies.v1.Policy} message
|
|
209
|
+
* @param {!jspb.BinaryWriter} writer
|
|
210
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
211
|
+
*/
|
|
212
|
+
proto.lansweeper.policies.v1.Policy.serializeBinaryToWriter = function(message, writer) {
|
|
213
|
+
var f = undefined;
|
|
214
|
+
f = message.getSendEachTimeInMinutes();
|
|
215
|
+
if (f !== 0) {
|
|
216
|
+
writer.writeInt32(
|
|
217
|
+
1,
|
|
218
|
+
f
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
f = message.getPolicyType();
|
|
222
|
+
if (f !== 0.0) {
|
|
223
|
+
writer.writeEnum(
|
|
224
|
+
2,
|
|
225
|
+
f
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* optional int32 send_each_time_in_minutes = 1;
|
|
233
|
+
* @return {number}
|
|
234
|
+
*/
|
|
235
|
+
proto.lansweeper.policies.v1.Policy.prototype.getSendEachTimeInMinutes = function() {
|
|
236
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @param {number} value
|
|
242
|
+
* @return {!proto.lansweeper.policies.v1.Policy} returns this
|
|
243
|
+
*/
|
|
244
|
+
proto.lansweeper.policies.v1.Policy.prototype.setSendEachTimeInMinutes = function(value) {
|
|
245
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* optional PolicyType policy_type = 2;
|
|
251
|
+
* @return {!proto.lansweeper.policies.v1.PolicyType}
|
|
252
|
+
*/
|
|
253
|
+
proto.lansweeper.policies.v1.Policy.prototype.getPolicyType = function() {
|
|
254
|
+
return /** @type {!proto.lansweeper.policies.v1.PolicyType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* @param {!proto.lansweeper.policies.v1.PolicyType} value
|
|
260
|
+
* @return {!proto.lansweeper.policies.v1.Policy} returns this
|
|
261
|
+
*/
|
|
262
|
+
proto.lansweeper.policies.v1.Policy.prototype.setPolicyType = function(value) {
|
|
263
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* List of repeated fields within this message type.
|
|
270
|
+
* @private {!Array<number>}
|
|
271
|
+
* @const
|
|
272
|
+
*/
|
|
273
|
+
proto.lansweeper.policies.v1.ContextPolicy.repeatedFields_ = [2];
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
278
|
+
/**
|
|
279
|
+
* Creates an object representation of this proto.
|
|
280
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
281
|
+
* Optional fields that are not set will be set to undefined.
|
|
282
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
283
|
+
* For the list of reserved names please see:
|
|
284
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
285
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
286
|
+
* JSPB instance for transitional soy proto support:
|
|
287
|
+
* http://goto/soy-param-migration
|
|
288
|
+
* @return {!Object}
|
|
289
|
+
*/
|
|
290
|
+
proto.lansweeper.policies.v1.ContextPolicy.prototype.toObject = function(opt_includeInstance) {
|
|
291
|
+
return proto.lansweeper.policies.v1.ContextPolicy.toObject(opt_includeInstance, this);
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Static version of the {@see toObject} method.
|
|
297
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
298
|
+
* the JSPB instance for transitional soy proto support:
|
|
299
|
+
* http://goto/soy-param-migration
|
|
300
|
+
* @param {!proto.lansweeper.policies.v1.ContextPolicy} msg The msg instance to transform.
|
|
301
|
+
* @return {!Object}
|
|
302
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
303
|
+
*/
|
|
304
|
+
proto.lansweeper.policies.v1.ContextPolicy.toObject = function(includeInstance, msg) {
|
|
305
|
+
var f, obj = {
|
|
306
|
+
context: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
307
|
+
policiesList: jspb.Message.toObjectList(msg.getPoliciesList(),
|
|
308
|
+
proto.lansweeper.policies.v1.Policy.toObject, includeInstance)
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
if (includeInstance) {
|
|
312
|
+
obj.$jspbMessageInstance = msg;
|
|
313
|
+
}
|
|
314
|
+
return obj;
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Deserializes binary data (in protobuf wire format).
|
|
321
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
322
|
+
* @return {!proto.lansweeper.policies.v1.ContextPolicy}
|
|
323
|
+
*/
|
|
324
|
+
proto.lansweeper.policies.v1.ContextPolicy.deserializeBinary = function(bytes) {
|
|
325
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
326
|
+
var msg = new proto.lansweeper.policies.v1.ContextPolicy;
|
|
327
|
+
return proto.lansweeper.policies.v1.ContextPolicy.deserializeBinaryFromReader(msg, reader);
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
333
|
+
* given reader into the given message object.
|
|
334
|
+
* @param {!proto.lansweeper.policies.v1.ContextPolicy} msg The message object to deserialize into.
|
|
335
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
336
|
+
* @return {!proto.lansweeper.policies.v1.ContextPolicy}
|
|
337
|
+
*/
|
|
338
|
+
proto.lansweeper.policies.v1.ContextPolicy.deserializeBinaryFromReader = function(msg, reader) {
|
|
339
|
+
while (reader.nextField()) {
|
|
340
|
+
if (reader.isEndGroup()) {
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
var field = reader.getFieldNumber();
|
|
344
|
+
switch (field) {
|
|
345
|
+
case 1:
|
|
346
|
+
var value = /** @type {string} */ (reader.readString());
|
|
347
|
+
msg.setContext(value);
|
|
348
|
+
break;
|
|
349
|
+
case 2:
|
|
350
|
+
var value = new proto.lansweeper.policies.v1.Policy;
|
|
351
|
+
reader.readMessage(value,proto.lansweeper.policies.v1.Policy.deserializeBinaryFromReader);
|
|
352
|
+
msg.addPolicies(value);
|
|
353
|
+
break;
|
|
354
|
+
default:
|
|
355
|
+
reader.skipField();
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return msg;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
365
|
+
* @return {!Uint8Array}
|
|
366
|
+
*/
|
|
367
|
+
proto.lansweeper.policies.v1.ContextPolicy.prototype.serializeBinary = function() {
|
|
368
|
+
var writer = new jspb.BinaryWriter();
|
|
369
|
+
proto.lansweeper.policies.v1.ContextPolicy.serializeBinaryToWriter(this, writer);
|
|
370
|
+
return writer.getResultBuffer();
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
376
|
+
* format), writing to the given BinaryWriter.
|
|
377
|
+
* @param {!proto.lansweeper.policies.v1.ContextPolicy} message
|
|
378
|
+
* @param {!jspb.BinaryWriter} writer
|
|
379
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
380
|
+
*/
|
|
381
|
+
proto.lansweeper.policies.v1.ContextPolicy.serializeBinaryToWriter = function(message, writer) {
|
|
382
|
+
var f = undefined;
|
|
383
|
+
f = message.getContext();
|
|
384
|
+
if (f.length > 0) {
|
|
385
|
+
writer.writeString(
|
|
386
|
+
1,
|
|
387
|
+
f
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
f = message.getPoliciesList();
|
|
391
|
+
if (f.length > 0) {
|
|
392
|
+
writer.writeRepeatedMessage(
|
|
393
|
+
2,
|
|
394
|
+
f,
|
|
395
|
+
proto.lansweeper.policies.v1.Policy.serializeBinaryToWriter
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* optional string context = 1;
|
|
403
|
+
* @return {string}
|
|
404
|
+
*/
|
|
405
|
+
proto.lansweeper.policies.v1.ContextPolicy.prototype.getContext = function() {
|
|
406
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @param {string} value
|
|
412
|
+
* @return {!proto.lansweeper.policies.v1.ContextPolicy} returns this
|
|
413
|
+
*/
|
|
414
|
+
proto.lansweeper.policies.v1.ContextPolicy.prototype.setContext = function(value) {
|
|
415
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* repeated Policy policies = 2;
|
|
421
|
+
* @return {!Array<!proto.lansweeper.policies.v1.Policy>}
|
|
422
|
+
*/
|
|
423
|
+
proto.lansweeper.policies.v1.ContextPolicy.prototype.getPoliciesList = function() {
|
|
424
|
+
return /** @type{!Array<!proto.lansweeper.policies.v1.Policy>} */ (
|
|
425
|
+
jspb.Message.getRepeatedWrapperField(this, proto.lansweeper.policies.v1.Policy, 2));
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @param {!Array<!proto.lansweeper.policies.v1.Policy>} value
|
|
431
|
+
* @return {!proto.lansweeper.policies.v1.ContextPolicy} returns this
|
|
432
|
+
*/
|
|
433
|
+
proto.lansweeper.policies.v1.ContextPolicy.prototype.setPoliciesList = function(value) {
|
|
434
|
+
return jspb.Message.setRepeatedWrapperField(this, 2, value);
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* @param {!proto.lansweeper.policies.v1.Policy=} opt_value
|
|
440
|
+
* @param {number=} opt_index
|
|
441
|
+
* @return {!proto.lansweeper.policies.v1.Policy}
|
|
442
|
+
*/
|
|
443
|
+
proto.lansweeper.policies.v1.ContextPolicy.prototype.addPolicies = function(opt_value, opt_index) {
|
|
444
|
+
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lansweeper.policies.v1.Policy, opt_index);
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Clears the list making it empty but non-null.
|
|
450
|
+
* @return {!proto.lansweeper.policies.v1.ContextPolicy} returns this
|
|
451
|
+
*/
|
|
452
|
+
proto.lansweeper.policies.v1.ContextPolicy.prototype.clearPoliciesList = function() {
|
|
453
|
+
return this.setPoliciesList([]);
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
461
|
+
/**
|
|
462
|
+
* Creates an object representation of this proto.
|
|
463
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
464
|
+
* Optional fields that are not set will be set to undefined.
|
|
465
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
466
|
+
* For the list of reserved names please see:
|
|
467
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
468
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
469
|
+
* JSPB instance for transitional soy proto support:
|
|
470
|
+
* http://goto/soy-param-migration
|
|
471
|
+
* @return {!Object}
|
|
472
|
+
*/
|
|
473
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.prototype.toObject = function(opt_includeInstance) {
|
|
474
|
+
return proto.lansweeper.policies.v1.GetInstallationPolicyRequest.toObject(opt_includeInstance, this);
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Static version of the {@see toObject} method.
|
|
480
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
481
|
+
* the JSPB instance for transitional soy proto support:
|
|
482
|
+
* http://goto/soy-param-migration
|
|
483
|
+
* @param {!proto.lansweeper.policies.v1.GetInstallationPolicyRequest} msg The msg instance to transform.
|
|
484
|
+
* @return {!Object}
|
|
485
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
486
|
+
*/
|
|
487
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.toObject = function(includeInstance, msg) {
|
|
488
|
+
var f, obj = {
|
|
489
|
+
siteId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
490
|
+
installKey: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
if (includeInstance) {
|
|
494
|
+
obj.$jspbMessageInstance = msg;
|
|
495
|
+
}
|
|
496
|
+
return obj;
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Deserializes binary data (in protobuf wire format).
|
|
503
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
504
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyRequest}
|
|
505
|
+
*/
|
|
506
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.deserializeBinary = function(bytes) {
|
|
507
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
508
|
+
var msg = new proto.lansweeper.policies.v1.GetInstallationPolicyRequest;
|
|
509
|
+
return proto.lansweeper.policies.v1.GetInstallationPolicyRequest.deserializeBinaryFromReader(msg, reader);
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
515
|
+
* given reader into the given message object.
|
|
516
|
+
* @param {!proto.lansweeper.policies.v1.GetInstallationPolicyRequest} msg The message object to deserialize into.
|
|
517
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
518
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyRequest}
|
|
519
|
+
*/
|
|
520
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
521
|
+
while (reader.nextField()) {
|
|
522
|
+
if (reader.isEndGroup()) {
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
var field = reader.getFieldNumber();
|
|
526
|
+
switch (field) {
|
|
527
|
+
case 1:
|
|
528
|
+
var value = /** @type {string} */ (reader.readString());
|
|
529
|
+
msg.setSiteId(value);
|
|
530
|
+
break;
|
|
531
|
+
case 2:
|
|
532
|
+
var value = /** @type {string} */ (reader.readString());
|
|
533
|
+
msg.setInstallKey(value);
|
|
534
|
+
break;
|
|
535
|
+
default:
|
|
536
|
+
reader.skipField();
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
return msg;
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
546
|
+
* @return {!Uint8Array}
|
|
547
|
+
*/
|
|
548
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.prototype.serializeBinary = function() {
|
|
549
|
+
var writer = new jspb.BinaryWriter();
|
|
550
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.serializeBinaryToWriter(this, writer);
|
|
551
|
+
return writer.getResultBuffer();
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
557
|
+
* format), writing to the given BinaryWriter.
|
|
558
|
+
* @param {!proto.lansweeper.policies.v1.GetInstallationPolicyRequest} message
|
|
559
|
+
* @param {!jspb.BinaryWriter} writer
|
|
560
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
561
|
+
*/
|
|
562
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.serializeBinaryToWriter = function(message, writer) {
|
|
563
|
+
var f = undefined;
|
|
564
|
+
f = message.getSiteId();
|
|
565
|
+
if (f.length > 0) {
|
|
566
|
+
writer.writeString(
|
|
567
|
+
1,
|
|
568
|
+
f
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
f = message.getInstallKey();
|
|
572
|
+
if (f.length > 0) {
|
|
573
|
+
writer.writeString(
|
|
574
|
+
2,
|
|
575
|
+
f
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* optional string site_id = 1;
|
|
583
|
+
* @return {string}
|
|
584
|
+
*/
|
|
585
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.prototype.getSiteId = function() {
|
|
586
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* @param {string} value
|
|
592
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyRequest} returns this
|
|
593
|
+
*/
|
|
594
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.prototype.setSiteId = function(value) {
|
|
595
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* optional string install_key = 2;
|
|
601
|
+
* @return {string}
|
|
602
|
+
*/
|
|
603
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.prototype.getInstallKey = function() {
|
|
604
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* @param {string} value
|
|
610
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyRequest} returns this
|
|
611
|
+
*/
|
|
612
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyRequest.prototype.setInstallKey = function(value) {
|
|
613
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* List of repeated fields within this message type.
|
|
620
|
+
* @private {!Array<number>}
|
|
621
|
+
* @const
|
|
622
|
+
*/
|
|
623
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.repeatedFields_ = [2];
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
628
|
+
/**
|
|
629
|
+
* Creates an object representation of this proto.
|
|
630
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
631
|
+
* Optional fields that are not set will be set to undefined.
|
|
632
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
633
|
+
* For the list of reserved names please see:
|
|
634
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
635
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
636
|
+
* JSPB instance for transitional soy proto support:
|
|
637
|
+
* http://goto/soy-param-migration
|
|
638
|
+
* @return {!Object}
|
|
639
|
+
*/
|
|
640
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.prototype.toObject = function(opt_includeInstance) {
|
|
641
|
+
return proto.lansweeper.policies.v1.GetInstallationPolicyResponse.toObject(opt_includeInstance, this);
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Static version of the {@see toObject} method.
|
|
647
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
648
|
+
* the JSPB instance for transitional soy proto support:
|
|
649
|
+
* http://goto/soy-param-migration
|
|
650
|
+
* @param {!proto.lansweeper.policies.v1.GetInstallationPolicyResponse} msg The msg instance to transform.
|
|
651
|
+
* @return {!Object}
|
|
652
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
653
|
+
*/
|
|
654
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.toObject = function(includeInstance, msg) {
|
|
655
|
+
var f, obj = {
|
|
656
|
+
installationPolicyType: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
657
|
+
contextPoliciesList: jspb.Message.toObjectList(msg.getContextPoliciesList(),
|
|
658
|
+
proto.lansweeper.policies.v1.ContextPolicy.toObject, includeInstance)
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
if (includeInstance) {
|
|
662
|
+
obj.$jspbMessageInstance = msg;
|
|
663
|
+
}
|
|
664
|
+
return obj;
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Deserializes binary data (in protobuf wire format).
|
|
671
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
672
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyResponse}
|
|
673
|
+
*/
|
|
674
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.deserializeBinary = function(bytes) {
|
|
675
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
676
|
+
var msg = new proto.lansweeper.policies.v1.GetInstallationPolicyResponse;
|
|
677
|
+
return proto.lansweeper.policies.v1.GetInstallationPolicyResponse.deserializeBinaryFromReader(msg, reader);
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
683
|
+
* given reader into the given message object.
|
|
684
|
+
* @param {!proto.lansweeper.policies.v1.GetInstallationPolicyResponse} msg The message object to deserialize into.
|
|
685
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
686
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyResponse}
|
|
687
|
+
*/
|
|
688
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
689
|
+
while (reader.nextField()) {
|
|
690
|
+
if (reader.isEndGroup()) {
|
|
691
|
+
break;
|
|
692
|
+
}
|
|
693
|
+
var field = reader.getFieldNumber();
|
|
694
|
+
switch (field) {
|
|
695
|
+
case 1:
|
|
696
|
+
var value = /** @type {string} */ (reader.readString());
|
|
697
|
+
msg.setInstallationPolicyType(value);
|
|
698
|
+
break;
|
|
699
|
+
case 2:
|
|
700
|
+
var value = new proto.lansweeper.policies.v1.ContextPolicy;
|
|
701
|
+
reader.readMessage(value,proto.lansweeper.policies.v1.ContextPolicy.deserializeBinaryFromReader);
|
|
702
|
+
msg.addContextPolicies(value);
|
|
703
|
+
break;
|
|
704
|
+
default:
|
|
705
|
+
reader.skipField();
|
|
706
|
+
break;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return msg;
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
715
|
+
* @return {!Uint8Array}
|
|
716
|
+
*/
|
|
717
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.prototype.serializeBinary = function() {
|
|
718
|
+
var writer = new jspb.BinaryWriter();
|
|
719
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.serializeBinaryToWriter(this, writer);
|
|
720
|
+
return writer.getResultBuffer();
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
726
|
+
* format), writing to the given BinaryWriter.
|
|
727
|
+
* @param {!proto.lansweeper.policies.v1.GetInstallationPolicyResponse} message
|
|
728
|
+
* @param {!jspb.BinaryWriter} writer
|
|
729
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
730
|
+
*/
|
|
731
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.serializeBinaryToWriter = function(message, writer) {
|
|
732
|
+
var f = undefined;
|
|
733
|
+
f = message.getInstallationPolicyType();
|
|
734
|
+
if (f.length > 0) {
|
|
735
|
+
writer.writeString(
|
|
736
|
+
1,
|
|
737
|
+
f
|
|
738
|
+
);
|
|
739
|
+
}
|
|
740
|
+
f = message.getContextPoliciesList();
|
|
741
|
+
if (f.length > 0) {
|
|
742
|
+
writer.writeRepeatedMessage(
|
|
743
|
+
2,
|
|
744
|
+
f,
|
|
745
|
+
proto.lansweeper.policies.v1.ContextPolicy.serializeBinaryToWriter
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* optional string installation_policy_type = 1;
|
|
753
|
+
* @return {string}
|
|
754
|
+
*/
|
|
755
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.prototype.getInstallationPolicyType = function() {
|
|
756
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
757
|
+
};
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* @param {string} value
|
|
762
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyResponse} returns this
|
|
763
|
+
*/
|
|
764
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.prototype.setInstallationPolicyType = function(value) {
|
|
765
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* repeated ContextPolicy context_policies = 2;
|
|
771
|
+
* @return {!Array<!proto.lansweeper.policies.v1.ContextPolicy>}
|
|
772
|
+
*/
|
|
773
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.prototype.getContextPoliciesList = function() {
|
|
774
|
+
return /** @type{!Array<!proto.lansweeper.policies.v1.ContextPolicy>} */ (
|
|
775
|
+
jspb.Message.getRepeatedWrapperField(this, proto.lansweeper.policies.v1.ContextPolicy, 2));
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* @param {!Array<!proto.lansweeper.policies.v1.ContextPolicy>} value
|
|
781
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyResponse} returns this
|
|
782
|
+
*/
|
|
783
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.prototype.setContextPoliciesList = function(value) {
|
|
784
|
+
return jspb.Message.setRepeatedWrapperField(this, 2, value);
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* @param {!proto.lansweeper.policies.v1.ContextPolicy=} opt_value
|
|
790
|
+
* @param {number=} opt_index
|
|
791
|
+
* @return {!proto.lansweeper.policies.v1.ContextPolicy}
|
|
792
|
+
*/
|
|
793
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.prototype.addContextPolicies = function(opt_value, opt_index) {
|
|
794
|
+
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lansweeper.policies.v1.ContextPolicy, opt_index);
|
|
795
|
+
};
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Clears the list making it empty but non-null.
|
|
800
|
+
* @return {!proto.lansweeper.policies.v1.GetInstallationPolicyResponse} returns this
|
|
801
|
+
*/
|
|
802
|
+
proto.lansweeper.policies.v1.GetInstallationPolicyResponse.prototype.clearContextPoliciesList = function() {
|
|
803
|
+
return this.setContextPoliciesList([]);
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* @enum {number}
|
|
809
|
+
*/
|
|
810
|
+
proto.lansweeper.policies.v1.PolicyType = {
|
|
811
|
+
POLICY_1: 0,
|
|
812
|
+
POLICY_2: 1,
|
|
813
|
+
POLICY_3: 2
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
goog.object.extend(exports, proto.lansweeper.policies.v1);
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lansweeper/policies-grpc",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "policies grpc",
|
|
5
|
+
"main": "gen-proto/index.js",
|
|
6
|
+
"types": "gen-proto/index.d.ts",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"files": [
|
|
9
|
+
"gen-proto",
|
|
10
|
+
"proto"
|
|
11
|
+
],
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@grpc/grpc-js": "^1.5.1",
|
|
14
|
+
"google-protobuf": "^3.17.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/google-protobuf": "^3.15.5"
|
|
18
|
+
},
|
|
19
|
+
"gitHead": "e2aa9c7eed704aa02f56e9628dfb616e19509958"
|
|
20
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package lansweeper.policies.v1;
|
|
4
|
+
|
|
5
|
+
enum PolicyType {
|
|
6
|
+
POLICY_1 = 0;
|
|
7
|
+
POLICY_2 = 1;
|
|
8
|
+
POLICY_3 = 2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message Policy {
|
|
12
|
+
int32 send_each_time_in_minutes = 1;
|
|
13
|
+
PolicyType policy_type = 2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message ContextPolicy {
|
|
17
|
+
string context = 1;
|
|
18
|
+
repeated Policy policies = 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message GetInstallationPolicyRequest {
|
|
22
|
+
string site_id = 1;
|
|
23
|
+
string install_key = 2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message GetInstallationPolicyResponse {
|
|
27
|
+
string installation_policy_type = 1;
|
|
28
|
+
repeated ContextPolicy context_policies = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
service PoliciesService {
|
|
32
|
+
rpc GetInstallationPolicy(GetInstallationPolicyRequest) returns (GetInstallationPolicyResponse) {}
|
|
33
|
+
}
|
|
34
|
+
|