summaryrefslogtreecommitdiff
path: root/packages/googleapi/src/googlepubsub.pp
diff options
context:
space:
mode:
Diffstat (limited to 'packages/googleapi/src/googlepubsub.pp')
-rw-r--r--packages/googleapi/src/googlepubsub.pp1433
1 files changed, 916 insertions, 517 deletions
diff --git a/packages/googleapi/src/googlepubsub.pp b/packages/googleapi/src/googlepubsub.pp
index d7d8d9ad3f..53fa0a3862 100644
--- a/packages/googleapi/src/googlepubsub.pp
+++ b/packages/googleapi/src/googlepubsub.pp
@@ -1,19 +1,4 @@
unit googlepubsub;
-{
- **********************************************************************
- This file is part of the Free Component Library (FCL)
- Copyright (c) 2015 The free pascal team.
-
- See the file COPYING.FPC, included in this distribution,
- for details about the copyright.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************
-}
-//Generated on: 16-5-15 08:53:07
{$MODE objfpc}
{$H+}
@@ -24,202 +9,236 @@ uses sysutils, classes, googleservice, restbase, googlebase;
type
//Top-level schema types
- TAcknowledgeRequest = Class;
+ TSetIamPolicyRequest = Class;
+ TPolicy = Class;
+ TBinding = Class;
+ TTestIamPermissionsRequest = Class;
+ TTestIamPermissionsResponse = Class;
+ TTopic = Class;
+ TPublishRequest = Class;
+ TPubsubMessage = Class;
+ TPublishResponse = Class;
+ TListTopicsResponse = Class;
+ TListTopicSubscriptionsResponse = Class;
TEmpty = Class;
+ TSubscription = Class;
+ TPushConfig = Class;
TListSubscriptionsResponse = Class;
- TListTopicSubscriptionsResponse = Class;
- TListTopicsResponse = Class;
TModifyAckDeadlineRequest = Class;
- TModifyPushConfigRequest = Class;
- TPublishRequest = Class;
- TPublishResponse = Class;
- TPubsubMessage = Class;
+ TAcknowledgeRequest = Class;
TPullRequest = Class;
TPullResponse = Class;
- TPushConfig = Class;
TReceivedMessage = Class;
- TSubscription = Class;
- TTopic = Class;
- TAcknowledgeRequestArray = Array of TAcknowledgeRequest;
+ TModifyPushConfigRequest = Class;
+ TSetIamPolicyRequestArray = Array of TSetIamPolicyRequest;
+ TPolicyArray = Array of TPolicy;
+ TBindingArray = Array of TBinding;
+ TTestIamPermissionsRequestArray = Array of TTestIamPermissionsRequest;
+ TTestIamPermissionsResponseArray = Array of TTestIamPermissionsResponse;
+ TTopicArray = Array of TTopic;
+ TPublishRequestArray = Array of TPublishRequest;
+ TPubsubMessageArray = Array of TPubsubMessage;
+ TPublishResponseArray = Array of TPublishResponse;
+ TListTopicsResponseArray = Array of TListTopicsResponse;
+ TListTopicSubscriptionsResponseArray = Array of TListTopicSubscriptionsResponse;
TEmptyArray = Array of TEmpty;
+ TSubscriptionArray = Array of TSubscription;
+ TPushConfigArray = Array of TPushConfig;
TListSubscriptionsResponseArray = Array of TListSubscriptionsResponse;
- TListTopicSubscriptionsResponseArray = Array of TListTopicSubscriptionsResponse;
- TListTopicsResponseArray = Array of TListTopicsResponse;
TModifyAckDeadlineRequestArray = Array of TModifyAckDeadlineRequest;
- TModifyPushConfigRequestArray = Array of TModifyPushConfigRequest;
- TPublishRequestArray = Array of TPublishRequest;
- TPublishResponseArray = Array of TPublishResponse;
- TPubsubMessageArray = Array of TPubsubMessage;
+ TAcknowledgeRequestArray = Array of TAcknowledgeRequest;
TPullRequestArray = Array of TPullRequest;
TPullResponseArray = Array of TPullResponse;
- TPushConfigArray = Array of TPushConfig;
TReceivedMessageArray = Array of TReceivedMessage;
- TSubscriptionArray = Array of TSubscription;
- TTopicArray = Array of TTopic;
+ TModifyPushConfigRequestArray = Array of TModifyPushConfigRequest;
//Anonymous types, using auto-generated names
TPubsubMessageTypeattributes = Class;
TPushConfigTypeattributes = Class;
- TListSubscriptionsResponseTypesubscriptionsArray = Array of TSubscription;
- TListTopicsResponseTypetopicsArray = Array of TTopic;
+ TPolicyTypebindingsArray = Array of TBinding;
TPublishRequestTypemessagesArray = Array of TPubsubMessage;
+ TListTopicsResponseTypetopicsArray = Array of TTopic;
+ TListSubscriptionsResponseTypesubscriptionsArray = Array of TSubscription;
TPullResponseTypereceivedMessagesArray = Array of TReceivedMessage;
{ --------------------------------------------------------------------
- TAcknowledgeRequest
+ TSetIamPolicyRequest
--------------------------------------------------------------------}
- TAcknowledgeRequest = Class(TGoogleBaseObject)
+ TSetIamPolicyRequest = Class(TGoogleBaseObject)
Private
- FackIds : TStringArray;
+ Fpolicy : TPolicy;
Protected
//Property setters
- Procedure SetackIds(AIndex : Integer; AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
+ Procedure Setpolicy(AIndex : Integer; const AValue : TPolicy); virtual;
Public
Published
- Property ackIds : TStringArray Index 0 Read FackIds Write SetackIds;
+ Property policy : TPolicy Index 0 Read Fpolicy Write Setpolicy;
end;
- TAcknowledgeRequestClass = Class of TAcknowledgeRequest;
+ TSetIamPolicyRequestClass = Class of TSetIamPolicyRequest;
{ --------------------------------------------------------------------
- TEmpty
+ TPolicy
--------------------------------------------------------------------}
- TEmpty = Class(TGoogleBaseObject)
+ TPolicy = Class(TGoogleBaseObject)
Private
+ Fversion : integer;
+ Fbindings : TPolicyTypebindingsArray;
+ Fetag : String;
Protected
//Property setters
+ Procedure Setversion(AIndex : Integer; const AValue : integer); virtual;
+ Procedure Setbindings(AIndex : Integer; const AValue : TPolicyTypebindingsArray); virtual;
+ Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
+ //2.6.4. bug workaround
+ {$IFDEF VER2_6}
+ Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
+ {$ENDIF VER2_6}
Public
Published
+ Property version : integer Index 0 Read Fversion Write Setversion;
+ Property bindings : TPolicyTypebindingsArray Index 8 Read Fbindings Write Setbindings;
+ Property etag : String Index 16 Read Fetag Write Setetag;
end;
- TEmptyClass = Class of TEmpty;
+ TPolicyClass = Class of TPolicy;
{ --------------------------------------------------------------------
- TListSubscriptionsResponse
+ TBinding
--------------------------------------------------------------------}
- TListSubscriptionsResponse = Class(TGoogleBaseObject)
+ TBinding = Class(TGoogleBaseObject)
Private
- FnextPageToken : String;
- Fsubscriptions : TListSubscriptionsResponseTypesubscriptionsArray;
+ Frole : String;
+ Fmembers : TStringArray;
Protected
//Property setters
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- Procedure Setsubscriptions(AIndex : Integer; AValue : TListSubscriptionsResponseTypesubscriptionsArray); virtual;
+ Procedure Setrole(AIndex : Integer; const AValue : String); virtual;
+ Procedure Setmembers(AIndex : Integer; const AValue : TStringArray); virtual;
//2.6.4. bug workaround
{$IFDEF VER2_6}
Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
{$ENDIF VER2_6}
Public
Published
- Property nextPageToken : String Index 0 Read FnextPageToken Write SetnextPageToken;
- Property subscriptions : TListSubscriptionsResponseTypesubscriptionsArray Index 8 Read Fsubscriptions Write Setsubscriptions;
+ Property role : String Index 0 Read Frole Write Setrole;
+ Property members : TStringArray Index 8 Read Fmembers Write Setmembers;
end;
- TListSubscriptionsResponseClass = Class of TListSubscriptionsResponse;
+ TBindingClass = Class of TBinding;
{ --------------------------------------------------------------------
- TListTopicSubscriptionsResponse
+ TTestIamPermissionsRequest
--------------------------------------------------------------------}
- TListTopicSubscriptionsResponse = Class(TGoogleBaseObject)
+ TTestIamPermissionsRequest = Class(TGoogleBaseObject)
Private
- FnextPageToken : String;
- Fsubscriptions : TStringArray;
+ Fpermissions : TStringArray;
Protected
//Property setters
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- Procedure Setsubscriptions(AIndex : Integer; AValue : TStringArray); virtual;
+ Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
//2.6.4. bug workaround
{$IFDEF VER2_6}
Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
{$ENDIF VER2_6}
Public
Published
- Property nextPageToken : String Index 0 Read FnextPageToken Write SetnextPageToken;
- Property subscriptions : TStringArray Index 8 Read Fsubscriptions Write Setsubscriptions;
+ Property permissions : TStringArray Index 0 Read Fpermissions Write Setpermissions;
end;
- TListTopicSubscriptionsResponseClass = Class of TListTopicSubscriptionsResponse;
+ TTestIamPermissionsRequestClass = Class of TTestIamPermissionsRequest;
{ --------------------------------------------------------------------
- TListTopicsResponse
+ TTestIamPermissionsResponse
--------------------------------------------------------------------}
- TListTopicsResponse = Class(TGoogleBaseObject)
+ TTestIamPermissionsResponse = Class(TGoogleBaseObject)
Private
- FnextPageToken : String;
- Ftopics : TListTopicsResponseTypetopicsArray;
+ Fpermissions : TStringArray;
Protected
//Property setters
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- Procedure Settopics(AIndex : Integer; AValue : TListTopicsResponseTypetopicsArray); virtual;
+ Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
//2.6.4. bug workaround
{$IFDEF VER2_6}
Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
{$ENDIF VER2_6}
Public
Published
- Property nextPageToken : String Index 0 Read FnextPageToken Write SetnextPageToken;
- Property topics : TListTopicsResponseTypetopicsArray Index 8 Read Ftopics Write Settopics;
+ Property permissions : TStringArray Index 0 Read Fpermissions Write Setpermissions;
end;
- TListTopicsResponseClass = Class of TListTopicsResponse;
+ TTestIamPermissionsResponseClass = Class of TTestIamPermissionsResponse;
{ --------------------------------------------------------------------
- TModifyAckDeadlineRequest
+ TTopic
--------------------------------------------------------------------}
- TModifyAckDeadlineRequest = Class(TGoogleBaseObject)
+ TTopic = Class(TGoogleBaseObject)
Private
- FackDeadlineSeconds : integer;
- FackId : String;
+ Fname : String;
Protected
//Property setters
- Procedure SetackDeadlineSeconds(AIndex : Integer; AValue : integer); virtual;
- Procedure SetackId(AIndex : Integer; const AValue : String); virtual;
+ Procedure Setname(AIndex : Integer; const AValue : String); virtual;
Public
Published
- Property ackDeadlineSeconds : integer Index 0 Read FackDeadlineSeconds Write SetackDeadlineSeconds;
- Property ackId : String Index 8 Read FackId Write SetackId;
+ Property name : String Index 0 Read Fname Write Setname;
end;
- TModifyAckDeadlineRequestClass = Class of TModifyAckDeadlineRequest;
+ TTopicClass = Class of TTopic;
{ --------------------------------------------------------------------
- TModifyPushConfigRequest
+ TPublishRequest
--------------------------------------------------------------------}
- TModifyPushConfigRequest = Class(TGoogleBaseObject)
+ TPublishRequest = Class(TGoogleBaseObject)
Private
- FpushConfig : TPushConfig;
+ Fmessages : TPublishRequestTypemessagesArray;
Protected
//Property setters
- Procedure SetpushConfig(AIndex : Integer; AValue : TPushConfig); virtual;
+ Procedure Setmessages(AIndex : Integer; const AValue : TPublishRequestTypemessagesArray); virtual;
+ //2.6.4. bug workaround
+ {$IFDEF VER2_6}
+ Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
+ {$ENDIF VER2_6}
Public
Published
- Property pushConfig : TPushConfig Index 0 Read FpushConfig Write SetpushConfig;
+ Property messages : TPublishRequestTypemessagesArray Index 0 Read Fmessages Write Setmessages;
end;
- TModifyPushConfigRequestClass = Class of TModifyPushConfigRequest;
+ TPublishRequestClass = Class of TPublishRequest;
{ --------------------------------------------------------------------
- TPublishRequest
+ TPubsubMessageTypeattributes
--------------------------------------------------------------------}
- TPublishRequest = Class(TGoogleBaseObject)
+ TPubsubMessageTypeattributes = Class(TGoogleBaseObject)
Private
- Fmessages : TPublishRequestTypemessagesArray;
Protected
//Property setters
- Procedure Setmessages(AIndex : Integer; AValue : TPublishRequestTypemessagesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
Public
+ Class Function AllowAdditionalProperties : Boolean; override;
Published
- Property messages : TPublishRequestTypemessagesArray Index 0 Read Fmessages Write Setmessages;
end;
- TPublishRequestClass = Class of TPublishRequest;
+ TPubsubMessageTypeattributesClass = Class of TPubsubMessageTypeattributes;
+
+ { --------------------------------------------------------------------
+ TPubsubMessage
+ --------------------------------------------------------------------}
+
+ TPubsubMessage = Class(TGoogleBaseObject)
+ Private
+ Fdata : String;
+ Fattributes : TPubsubMessageTypeattributes;
+ FmessageId : String;
+ FpublishTime : String;
+ Protected
+ //Property setters
+ Procedure Setdata(AIndex : Integer; const AValue : String); virtual;
+ Procedure Setattributes(AIndex : Integer; const AValue : TPubsubMessageTypeattributes); virtual;
+ Procedure SetmessageId(AIndex : Integer; const AValue : String); virtual;
+ Procedure SetpublishTime(AIndex : Integer; const AValue : String); virtual;
+ Public
+ Published
+ Property data : String Index 0 Read Fdata Write Setdata;
+ Property attributes : TPubsubMessageTypeattributes Index 8 Read Fattributes Write Setattributes;
+ Property messageId : String Index 16 Read FmessageId Write SetmessageId;
+ Property publishTime : String Index 24 Read FpublishTime Write SetpublishTime;
+ end;
+ TPubsubMessageClass = Class of TPubsubMessage;
{ --------------------------------------------------------------------
TPublishResponse
@@ -230,7 +249,7 @@ type
FmessageIds : TStringArray;
Protected
//Property setters
- Procedure SetmessageIds(AIndex : Integer; AValue : TStringArray); virtual;
+ Procedure SetmessageIds(AIndex : Integer; const AValue : TStringArray); virtual;
//2.6.4. bug workaround
{$IFDEF VER2_6}
Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
@@ -242,79 +261,88 @@ type
TPublishResponseClass = Class of TPublishResponse;
{ --------------------------------------------------------------------
- TPubsubMessageTypeattributes
+ TListTopicsResponse
--------------------------------------------------------------------}
- TPubsubMessageTypeattributes = Class(TGoogleBaseObject)
+ TListTopicsResponse = Class(TGoogleBaseObject)
Private
+ Ftopics : TListTopicsResponseTypetopicsArray;
+ FnextPageToken : String;
Protected
//Property setters
+ Procedure Settopics(AIndex : Integer; const AValue : TListTopicsResponseTypetopicsArray); virtual;
+ Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
+ //2.6.4. bug workaround
+ {$IFDEF VER2_6}
+ Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
+ {$ENDIF VER2_6}
Public
- Class Function AllowAdditionalProperties : Boolean; override;
Published
+ Property topics : TListTopicsResponseTypetopicsArray Index 0 Read Ftopics Write Settopics;
+ Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
end;
- TPubsubMessageTypeattributesClass = Class of TPubsubMessageTypeattributes;
+ TListTopicsResponseClass = Class of TListTopicsResponse;
{ --------------------------------------------------------------------
- TPubsubMessage
+ TListTopicSubscriptionsResponse
--------------------------------------------------------------------}
- TPubsubMessage = Class(TGoogleBaseObject)
+ TListTopicSubscriptionsResponse = Class(TGoogleBaseObject)
Private
- Fattributes : TPubsubMessageTypeattributes;
- Fdata : String;
- FmessageId : String;
+ Fsubscriptions : TStringArray;
+ FnextPageToken : String;
Protected
//Property setters
- Procedure Setattributes(AIndex : Integer; AValue : TPubsubMessageTypeattributes); virtual;
- Procedure Setdata(AIndex : Integer; const AValue : String); virtual;
- Procedure SetmessageId(AIndex : Integer; const AValue : String); virtual;
+ Procedure Setsubscriptions(AIndex : Integer; const AValue : TStringArray); virtual;
+ Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
+ //2.6.4. bug workaround
+ {$IFDEF VER2_6}
+ Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
+ {$ENDIF VER2_6}
Public
Published
- Property attributes : TPubsubMessageTypeattributes Index 0 Read Fattributes Write Setattributes;
- Property data : String Index 8 Read Fdata Write Setdata;
- Property messageId : String Index 16 Read FmessageId Write SetmessageId;
+ Property subscriptions : TStringArray Index 0 Read Fsubscriptions Write Setsubscriptions;
+ Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
end;
- TPubsubMessageClass = Class of TPubsubMessage;
+ TListTopicSubscriptionsResponseClass = Class of TListTopicSubscriptionsResponse;
{ --------------------------------------------------------------------
- TPullRequest
+ TEmpty
--------------------------------------------------------------------}
- TPullRequest = Class(TGoogleBaseObject)
+ TEmpty = Class(TGoogleBaseObject)
Private
- FmaxMessages : integer;
- FreturnImmediately : boolean;
Protected
//Property setters
- Procedure SetmaxMessages(AIndex : Integer; AValue : integer); virtual;
- Procedure SetreturnImmediately(AIndex : Integer; AValue : boolean); virtual;
Public
Published
- Property maxMessages : integer Index 0 Read FmaxMessages Write SetmaxMessages;
- Property returnImmediately : boolean Index 8 Read FreturnImmediately Write SetreturnImmediately;
end;
- TPullRequestClass = Class of TPullRequest;
+ TEmptyClass = Class of TEmpty;
{ --------------------------------------------------------------------
- TPullResponse
+ TSubscription
--------------------------------------------------------------------}
- TPullResponse = Class(TGoogleBaseObject)
+ TSubscription = Class(TGoogleBaseObject)
Private
- FreceivedMessages : TPullResponseTypereceivedMessagesArray;
+ Fname : String;
+ Ftopic : String;
+ FpushConfig : TPushConfig;
+ FackDeadlineSeconds : integer;
Protected
//Property setters
- Procedure SetreceivedMessages(AIndex : Integer; AValue : TPullResponseTypereceivedMessagesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
+ Procedure Setname(AIndex : Integer; const AValue : String); virtual;
+ Procedure Settopic(AIndex : Integer; const AValue : String); virtual;
+ Procedure SetpushConfig(AIndex : Integer; const AValue : TPushConfig); virtual;
+ Procedure SetackDeadlineSeconds(AIndex : Integer; const AValue : integer); virtual;
Public
Published
- Property receivedMessages : TPullResponseTypereceivedMessagesArray Index 0 Read FreceivedMessages Write SetreceivedMessages;
+ Property name : String Index 0 Read Fname Write Setname;
+ Property topic : String Index 8 Read Ftopic Write Settopic;
+ Property pushConfig : TPushConfig Index 16 Read FpushConfig Write SetpushConfig;
+ Property ackDeadlineSeconds : integer Index 24 Read FackDeadlineSeconds Write SetackDeadlineSeconds;
end;
- TPullResponseClass = Class of TPullResponse;
+ TSubscriptionClass = Class of TSubscription;
{ --------------------------------------------------------------------
TPushConfigTypeattributes
@@ -336,106 +364,158 @@ type
TPushConfig = Class(TGoogleBaseObject)
Private
- Fattributes : TPushConfigTypeattributes;
FpushEndpoint : String;
+ Fattributes : TPushConfigTypeattributes;
Protected
//Property setters
- Procedure Setattributes(AIndex : Integer; AValue : TPushConfigTypeattributes); virtual;
Procedure SetpushEndpoint(AIndex : Integer; const AValue : String); virtual;
+ Procedure Setattributes(AIndex : Integer; const AValue : TPushConfigTypeattributes); virtual;
Public
Published
- Property attributes : TPushConfigTypeattributes Index 0 Read Fattributes Write Setattributes;
- Property pushEndpoint : String Index 8 Read FpushEndpoint Write SetpushEndpoint;
+ Property pushEndpoint : String Index 0 Read FpushEndpoint Write SetpushEndpoint;
+ Property attributes : TPushConfigTypeattributes Index 8 Read Fattributes Write Setattributes;
end;
TPushConfigClass = Class of TPushConfig;
{ --------------------------------------------------------------------
- TReceivedMessage
+ TListSubscriptionsResponse
--------------------------------------------------------------------}
- TReceivedMessage = Class(TGoogleBaseObject)
+ TListSubscriptionsResponse = Class(TGoogleBaseObject)
Private
- FackId : String;
- Fmessage : TPubsubMessage;
+ Fsubscriptions : TListSubscriptionsResponseTypesubscriptionsArray;
+ FnextPageToken : String;
Protected
//Property setters
- Procedure SetackId(AIndex : Integer; const AValue : String); virtual;
- Procedure Setmessage(AIndex : Integer; AValue : TPubsubMessage); virtual;
+ Procedure Setsubscriptions(AIndex : Integer; const AValue : TListSubscriptionsResponseTypesubscriptionsArray); virtual;
+ Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
+ //2.6.4. bug workaround
+ {$IFDEF VER2_6}
+ Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
+ {$ENDIF VER2_6}
Public
Published
- Property ackId : String Index 0 Read FackId Write SetackId;
- Property message : TPubsubMessage Index 8 Read Fmessage Write Setmessage;
+ Property subscriptions : TListSubscriptionsResponseTypesubscriptionsArray Index 0 Read Fsubscriptions Write Setsubscriptions;
+ Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
end;
- TReceivedMessageClass = Class of TReceivedMessage;
+ TListSubscriptionsResponseClass = Class of TListSubscriptionsResponse;
{ --------------------------------------------------------------------
- TSubscription
+ TModifyAckDeadlineRequest
--------------------------------------------------------------------}
- TSubscription = Class(TGoogleBaseObject)
+ TModifyAckDeadlineRequest = Class(TGoogleBaseObject)
Private
+ FackIds : TStringArray;
FackDeadlineSeconds : integer;
- Fname : String;
- FpushConfig : TPushConfig;
- Ftopic : String;
Protected
//Property setters
- Procedure SetackDeadlineSeconds(AIndex : Integer; AValue : integer); virtual;
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Procedure SetpushConfig(AIndex : Integer; AValue : TPushConfig); virtual;
- Procedure Settopic(AIndex : Integer; const AValue : String); virtual;
+ Procedure SetackIds(AIndex : Integer; const AValue : TStringArray); virtual;
+ Procedure SetackDeadlineSeconds(AIndex : Integer; const AValue : integer); virtual;
+ //2.6.4. bug workaround
+ {$IFDEF VER2_6}
+ Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
+ {$ENDIF VER2_6}
Public
Published
- Property ackDeadlineSeconds : integer Index 0 Read FackDeadlineSeconds Write SetackDeadlineSeconds;
- Property name : String Index 8 Read Fname Write Setname;
- Property pushConfig : TPushConfig Index 16 Read FpushConfig Write SetpushConfig;
- Property topic : String Index 24 Read Ftopic Write Settopic;
+ Property ackIds : TStringArray Index 0 Read FackIds Write SetackIds;
+ Property ackDeadlineSeconds : integer Index 8 Read FackDeadlineSeconds Write SetackDeadlineSeconds;
end;
- TSubscriptionClass = Class of TSubscription;
+ TModifyAckDeadlineRequestClass = Class of TModifyAckDeadlineRequest;
{ --------------------------------------------------------------------
- TTopic
+ TAcknowledgeRequest
--------------------------------------------------------------------}
- TTopic = Class(TGoogleBaseObject)
+ TAcknowledgeRequest = Class(TGoogleBaseObject)
Private
- Fname : String;
+ FackIds : TStringArray;
Protected
//Property setters
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
+ Procedure SetackIds(AIndex : Integer; const AValue : TStringArray); virtual;
+ //2.6.4. bug workaround
+ {$IFDEF VER2_6}
+ Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
+ {$ENDIF VER2_6}
Public
Published
- Property name : String Index 0 Read Fname Write Setname;
+ Property ackIds : TStringArray Index 0 Read FackIds Write SetackIds;
end;
- TTopicClass = Class of TTopic;
+ TAcknowledgeRequestClass = Class of TAcknowledgeRequest;
{ --------------------------------------------------------------------
- TProjectsSubscriptionsResource
+ TPullRequest
--------------------------------------------------------------------}
+ TPullRequest = Class(TGoogleBaseObject)
+ Private
+ FreturnImmediately : boolean;
+ FmaxMessages : integer;
+ Protected
+ //Property setters
+ Procedure SetreturnImmediately(AIndex : Integer; const AValue : boolean); virtual;
+ Procedure SetmaxMessages(AIndex : Integer; const AValue : integer); virtual;
+ Public
+ Published
+ Property returnImmediately : boolean Index 0 Read FreturnImmediately Write SetreturnImmediately;
+ Property maxMessages : integer Index 8 Read FmaxMessages Write SetmaxMessages;
+ end;
+ TPullRequestClass = Class of TPullRequest;
- //Optional query Options for TProjectsSubscriptionsResource, method List
+ { --------------------------------------------------------------------
+ TPullResponse
+ --------------------------------------------------------------------}
- TProjectsSubscriptionsListOptions = Record
- pageSize : integer;
- pageToken : String;
+ TPullResponse = Class(TGoogleBaseObject)
+ Private
+ FreceivedMessages : TPullResponseTypereceivedMessagesArray;
+ Protected
+ //Property setters
+ Procedure SetreceivedMessages(AIndex : Integer; const AValue : TPullResponseTypereceivedMessagesArray); virtual;
+ //2.6.4. bug workaround
+ {$IFDEF VER2_6}
+ Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
+ {$ENDIF VER2_6}
+ Public
+ Published
+ Property receivedMessages : TPullResponseTypereceivedMessagesArray Index 0 Read FreceivedMessages Write SetreceivedMessages;
end;
+ TPullResponseClass = Class of TPullResponse;
- TProjectsSubscriptionsResource = Class(TGoogleResource)
+ { --------------------------------------------------------------------
+ TReceivedMessage
+ --------------------------------------------------------------------}
+
+ TReceivedMessage = Class(TGoogleBaseObject)
+ Private
+ FackId : String;
+ Fmessage : TPubsubMessage;
+ Protected
+ //Property setters
+ Procedure SetackId(AIndex : Integer; const AValue : String); virtual;
+ Procedure Setmessage(AIndex : Integer; const AValue : TPubsubMessage); virtual;
Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Acknowledge(subscription: string; aAcknowledgeRequest : TAcknowledgeRequest) : TEmpty;
- Function Create(_name: string; aSubscription : TSubscription) : TSubscription;overload;
- Function Delete(subscription: string) : TEmpty;
- Function Get(subscription: string) : TSubscription;
- Function List(project: string; AQuery : string = '') : TListSubscriptionsResponse;
- Function List(project: string; AQuery : TProjectsSubscriptionslistOptions) : TListSubscriptionsResponse;
- Function ModifyAckDeadline(subscription: string; aModifyAckDeadlineRequest : TModifyAckDeadlineRequest) : TEmpty;
- Function ModifyPushConfig(subscription: string; aModifyPushConfigRequest : TModifyPushConfigRequest) : TEmpty;
- Function Pull(subscription: string; aPullRequest : TPullRequest) : TPullResponse;
+ Published
+ Property ackId : String Index 0 Read FackId Write SetackId;
+ Property message : TPubsubMessage Index 8 Read Fmessage Write Setmessage;
end;
+ TReceivedMessageClass = Class of TReceivedMessage;
+
+ { --------------------------------------------------------------------
+ TModifyPushConfigRequest
+ --------------------------------------------------------------------}
+ TModifyPushConfigRequest = Class(TGoogleBaseObject)
+ Private
+ FpushConfig : TPushConfig;
+ Protected
+ //Property setters
+ Procedure SetpushConfig(AIndex : Integer; const AValue : TPushConfig); virtual;
+ Public
+ Published
+ Property pushConfig : TPushConfig Index 0 Read FpushConfig Write SetpushConfig;
+ end;
+ TModifyPushConfigRequestClass = Class of TModifyPushConfigRequest;
{ --------------------------------------------------------------------
TProjectsTopicsSubscriptionsResource
@@ -477,12 +557,15 @@ type
Public
Class Function ResourceName : String; override;
Class Function DefaultAPI : TGoogleAPIClass; override;
+ Function SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
+ Function GetIamPolicy(resource: string) : TPolicy;
+ Function TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
Function Create(_name: string; aTopic : TTopic) : TTopic;overload;
- Function Delete(topic: string) : TEmpty;
+ Function Publish(topic: string; aPublishRequest : TPublishRequest) : TPublishResponse;
Function Get(topic: string) : TTopic;
Function List(project: string; AQuery : string = '') : TListTopicsResponse;
Function List(project: string; AQuery : TProjectsTopicslistOptions) : TListTopicsResponse;
- Function Publish(topic: string; aPublishRequest : TPublishRequest) : TPublishResponse;
+ Function Delete(topic: string) : TEmpty;
Function CreateSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
Function CreateSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
Property SubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetSubscriptionsInstance;
@@ -490,29 +573,60 @@ type
{ --------------------------------------------------------------------
+ TProjectsSubscriptionsResource
+ --------------------------------------------------------------------}
+
+
+ //Optional query Options for TProjectsSubscriptionsResource, method List
+
+ TProjectsSubscriptionsListOptions = Record
+ pageSize : integer;
+ pageToken : String;
+ end;
+
+ TProjectsSubscriptionsResource = Class(TGoogleResource)
+ Public
+ Class Function ResourceName : String; override;
+ Class Function DefaultAPI : TGoogleAPIClass; override;
+ Function SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
+ Function GetIamPolicy(resource: string) : TPolicy;
+ Function TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
+ Function Create(_name: string; aSubscription : TSubscription) : TSubscription;overload;
+ Function Get(subscription: string) : TSubscription;
+ Function List(project: string; AQuery : string = '') : TListSubscriptionsResponse;
+ Function List(project: string; AQuery : TProjectsSubscriptionslistOptions) : TListSubscriptionsResponse;
+ Function Delete(subscription: string) : TEmpty;
+ Function ModifyAckDeadline(subscription: string; aModifyAckDeadlineRequest : TModifyAckDeadlineRequest) : TEmpty;
+ Function Acknowledge(subscription: string; aAcknowledgeRequest : TAcknowledgeRequest) : TEmpty;
+ Function Pull(subscription: string; aPullRequest : TPullRequest) : TPullResponse;
+ Function ModifyPushConfig(subscription: string; aModifyPushConfigRequest : TModifyPushConfigRequest) : TEmpty;
+ end;
+
+
+ { --------------------------------------------------------------------
TProjectsResource
--------------------------------------------------------------------}
TProjectsResource = Class(TGoogleResource)
Private
- FSubscriptionsInstance : TProjectsSubscriptionsResource;
FTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
FTopicsInstance : TProjectsTopicsResource;
- Function GetSubscriptionsInstance : TProjectsSubscriptionsResource;virtual;
+ FSubscriptionsInstance : TProjectsSubscriptionsResource;
Function GetTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;virtual;
Function GetTopicsInstance : TProjectsTopicsResource;virtual;
+ Function GetSubscriptionsInstance : TProjectsSubscriptionsResource;virtual;
Public
Class Function ResourceName : String; override;
Class Function DefaultAPI : TGoogleAPIClass; override;
- Function CreateSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;virtual;overload;
- Function CreateSubscriptionsResource : TProjectsSubscriptionsResource;virtual;overload;
Function CreateTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
Function CreateTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
Function CreateTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;virtual;overload;
Function CreateTopicsResource : TProjectsTopicsResource;virtual;overload;
- Property SubscriptionsResource : TProjectsSubscriptionsResource Read GetSubscriptionsInstance;
+ Function CreateSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;virtual;overload;
+ Function CreateSubscriptionsResource : TProjectsSubscriptionsResource;virtual;overload;
Property TopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetTopicsSubscriptionsInstance;
Property TopicsResource : TProjectsTopicsResource Read GetTopicsInstance;
+ Property SubscriptionsResource : TProjectsSubscriptionsResource Read GetSubscriptionsInstance;
end;
@@ -522,13 +636,13 @@ type
TPubsubAPI = Class(TGoogleAPI)
Private
- FProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;
FProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
FProjectsTopicsInstance : TProjectsTopicsResource;
+ FProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;
FProjectsInstance : TProjectsResource;
- Function GetProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;virtual;
Function GetProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;virtual;
Function GetProjectsTopicsInstance : TProjectsTopicsResource;virtual;
+ Function GetProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;virtual;
Function GetProjectsInstance : TProjectsResource;virtual;
Public
//Override class functions with API info
@@ -553,18 +667,18 @@ type
Class Function APINeedsAuth : Boolean;override;
Class Procedure RegisterAPIResources; override;
//Add create function for resources
- Function CreateProjectsSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;virtual;overload;
- Function CreateProjectsSubscriptionsResource : TProjectsSubscriptionsResource;virtual;overload;
Function CreateProjectsTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
Function CreateProjectsTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
Function CreateProjectsTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;virtual;overload;
Function CreateProjectsTopicsResource : TProjectsTopicsResource;virtual;overload;
+ Function CreateProjectsSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;virtual;overload;
+ Function CreateProjectsSubscriptionsResource : TProjectsSubscriptionsResource;virtual;overload;
Function CreateProjectsResource(AOwner : TComponent) : TProjectsResource;virtual;overload;
Function CreateProjectsResource : TProjectsResource;virtual;overload;
//Add default on-demand instances for resources
- Property ProjectsSubscriptionsResource : TProjectsSubscriptionsResource Read GetProjectsSubscriptionsInstance;
Property ProjectsTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetProjectsTopicsSubscriptionsInstance;
Property ProjectsTopicsResource : TProjectsTopicsResource Read GetProjectsTopicsInstance;
+ Property ProjectsSubscriptionsResource : TProjectsSubscriptionsResource Read GetProjectsSubscriptionsInstance;
Property ProjectsResource : TProjectsResource Read GetProjectsInstance;
end;
@@ -572,73 +686,63 @@ implementation
{ --------------------------------------------------------------------
- TAcknowledgeRequest
+ TSetIamPolicyRequest
--------------------------------------------------------------------}
-Procedure TAcknowledgeRequest.SetackIds(AIndex : Integer; AValue : TStringArray);
+Procedure TSetIamPolicyRequest.Setpolicy(AIndex : Integer; const AValue : TPolicy);
begin
- If (FackIds=AValue) then exit;
- FackIds:=AValue;
+ If (Fpolicy=AValue) then exit;
+ Fpolicy:=AValue;
MarkPropertyChanged(AIndex);
end;
-//2.6.4. bug workaround
-{$IFDEF VER2_6}
-Procedure TAcknowledgeRequest.SetArrayLength(Const AName : String; ALength : Longint);
-
-begin
- Case AName of
- 'ackids' : SetLength(FackIds,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
-end;
-{$ENDIF VER2_6}
-
{ --------------------------------------------------------------------
- TEmpty
+ TPolicy
--------------------------------------------------------------------}
+Procedure TPolicy.Setversion(AIndex : Integer; const AValue : integer);
+begin
+ If (Fversion=AValue) then exit;
+ Fversion:=AValue;
+ MarkPropertyChanged(AIndex);
+end;
-{ --------------------------------------------------------------------
- TListSubscriptionsResponse
- --------------------------------------------------------------------}
-Procedure TListSubscriptionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
+Procedure TPolicy.Setbindings(AIndex : Integer; const AValue : TPolicyTypebindingsArray);
begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
+ If (Fbindings=AValue) then exit;
+ Fbindings:=AValue;
MarkPropertyChanged(AIndex);
end;
-Procedure TListSubscriptionsResponse.Setsubscriptions(AIndex : Integer; AValue : TListSubscriptionsResponseTypesubscriptionsArray);
+Procedure TPolicy.Setetag(AIndex : Integer; const AValue : String);
begin
- If (Fsubscriptions=AValue) then exit;
- Fsubscriptions:=AValue;
+ If (Fetag=AValue) then exit;
+ Fetag:=AValue;
MarkPropertyChanged(AIndex);
end;
//2.6.4. bug workaround
{$IFDEF VER2_6}
-Procedure TListSubscriptionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
+Procedure TPolicy.SetArrayLength(Const AName : String; ALength : Longint);
begin
Case AName of
- 'subscriptions' : SetLength(Fsubscriptions,ALength);
+ 'bindings' : SetLength(Fbindings,ALength);
else
Inherited SetArrayLength(AName,ALength);
end;
@@ -649,36 +753,36 @@ end;
{ --------------------------------------------------------------------
- TListTopicSubscriptionsResponse
+ TBinding
--------------------------------------------------------------------}
-Procedure TListTopicSubscriptionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
+Procedure TBinding.Setrole(AIndex : Integer; const AValue : String);
begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
+ If (Frole=AValue) then exit;
+ Frole:=AValue;
MarkPropertyChanged(AIndex);
end;
-Procedure TListTopicSubscriptionsResponse.Setsubscriptions(AIndex : Integer; AValue : TStringArray);
+Procedure TBinding.Setmembers(AIndex : Integer; const AValue : TStringArray);
begin
- If (Fsubscriptions=AValue) then exit;
- Fsubscriptions:=AValue;
+ If (Fmembers=AValue) then exit;
+ Fmembers:=AValue;
MarkPropertyChanged(AIndex);
end;
//2.6.4. bug workaround
{$IFDEF VER2_6}
-Procedure TListTopicSubscriptionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
+Procedure TBinding.SetArrayLength(Const AName : String; ALength : Longint);
begin
Case AName of
- 'subscriptions' : SetLength(Fsubscriptions,ALength);
+ 'members' : SetLength(Fmembers,ALength);
else
Inherited SetArrayLength(AName,ALength);
end;
@@ -689,36 +793,26 @@ end;
{ --------------------------------------------------------------------
- TListTopicsResponse
+ TTestIamPermissionsRequest
--------------------------------------------------------------------}
-Procedure TListTopicsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
-
-begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
-end;
-
-
-
-Procedure TListTopicsResponse.Settopics(AIndex : Integer; AValue : TListTopicsResponseTypetopicsArray);
+Procedure TTestIamPermissionsRequest.Setpermissions(AIndex : Integer; const AValue : TStringArray);
begin
- If (Ftopics=AValue) then exit;
- Ftopics:=AValue;
+ If (Fpermissions=AValue) then exit;
+ Fpermissions:=AValue;
MarkPropertyChanged(AIndex);
end;
//2.6.4. bug workaround
{$IFDEF VER2_6}
-Procedure TListTopicsResponse.SetArrayLength(Const AName : String; ALength : Longint);
+Procedure TTestIamPermissionsRequest.SetArrayLength(Const AName : String; ALength : Longint);
begin
Case AName of
- 'topics' : SetLength(Ftopics,ALength);
+ 'permissions' : SetLength(Fpermissions,ALength);
else
Inherited SetArrayLength(AName,ALength);
end;
@@ -729,42 +823,45 @@ end;
{ --------------------------------------------------------------------
- TModifyAckDeadlineRequest
+ TTestIamPermissionsResponse
--------------------------------------------------------------------}
-Procedure TModifyAckDeadlineRequest.SetackDeadlineSeconds(AIndex : Integer; AValue : integer);
+Procedure TTestIamPermissionsResponse.Setpermissions(AIndex : Integer; const AValue : TStringArray);
begin
- If (FackDeadlineSeconds=AValue) then exit;
- FackDeadlineSeconds:=AValue;
+ If (Fpermissions=AValue) then exit;
+ Fpermissions:=AValue;
MarkPropertyChanged(AIndex);
end;
-
-Procedure TModifyAckDeadlineRequest.SetackId(AIndex : Integer; const AValue : String);
+//2.6.4. bug workaround
+{$IFDEF VER2_6}
+Procedure TTestIamPermissionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
begin
- If (FackId=AValue) then exit;
- FackId:=AValue;
- MarkPropertyChanged(AIndex);
+ Case AName of
+ 'permissions' : SetLength(Fpermissions,ALength);
+ else
+ Inherited SetArrayLength(AName,ALength);
+ end;
end;
-
+{$ENDIF VER2_6}
{ --------------------------------------------------------------------
- TModifyPushConfigRequest
+ TTopic
--------------------------------------------------------------------}
-Procedure TModifyPushConfigRequest.SetpushConfig(AIndex : Integer; AValue : TPushConfig);
+Procedure TTopic.Setname(AIndex : Integer; const AValue : String);
begin
- If (FpushConfig=AValue) then exit;
- FpushConfig:=AValue;
+ If (Fname=AValue) then exit;
+ Fname:=AValue;
MarkPropertyChanged(AIndex);
end;
@@ -777,7 +874,7 @@ end;
--------------------------------------------------------------------}
-Procedure TPublishRequest.Setmessages(AIndex : Integer; AValue : TPublishRequestTypemessagesArray);
+Procedure TPublishRequest.Setmessages(AIndex : Integer; const AValue : TPublishRequestTypemessagesArray);
begin
If (Fmessages=AValue) then exit;
@@ -803,54 +900,34 @@ end;
{ --------------------------------------------------------------------
- TPublishResponse
+ TPubsubMessageTypeattributes
--------------------------------------------------------------------}
-Procedure TPublishResponse.SetmessageIds(AIndex : Integer; AValue : TStringArray);
-
-begin
- If (FmessageIds=AValue) then exit;
- FmessageIds:=AValue;
- MarkPropertyChanged(AIndex);
-end;
-
-
-//2.6.4. bug workaround
-{$IFDEF VER2_6}
-Procedure TPublishResponse.SetArrayLength(Const AName : String; ALength : Longint);
+Class Function TPubsubMessageTypeattributes.AllowAdditionalProperties : Boolean;
begin
- Case AName of
- 'messageids' : SetLength(FmessageIds,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
+ Result:=True;
end;
-{$ENDIF VER2_6}
-
{ --------------------------------------------------------------------
- TPubsubMessageTypeattributes
+ TPubsubMessage
--------------------------------------------------------------------}
-Class Function TPubsubMessageTypeattributes.AllowAdditionalProperties : Boolean;
+Procedure TPubsubMessage.Setdata(AIndex : Integer; const AValue : String);
begin
- Result:=True;
+ If (Fdata=AValue) then exit;
+ Fdata:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-{ --------------------------------------------------------------------
- TPubsubMessage
- --------------------------------------------------------------------}
-
-
-Procedure TPubsubMessage.Setattributes(AIndex : Integer; AValue : TPubsubMessageTypeattributes);
+Procedure TPubsubMessage.Setattributes(AIndex : Integer; const AValue : TPubsubMessageTypeattributes);
begin
If (Fattributes=AValue) then exit;
@@ -860,21 +937,21 @@ end;
-Procedure TPubsubMessage.Setdata(AIndex : Integer; const AValue : String);
+Procedure TPubsubMessage.SetmessageId(AIndex : Integer; const AValue : String);
begin
- If (Fdata=AValue) then exit;
- Fdata:=AValue;
+ If (FmessageId=AValue) then exit;
+ FmessageId:=AValue;
MarkPropertyChanged(AIndex);
end;
-Procedure TPubsubMessage.SetmessageId(AIndex : Integer; const AValue : String);
+Procedure TPubsubMessage.SetpublishTime(AIndex : Integer; const AValue : String);
begin
- If (FmessageId=AValue) then exit;
- FmessageId:=AValue;
+ If (FpublishTime=AValue) then exit;
+ FpublishTime:=AValue;
MarkPropertyChanged(AIndex);
end;
@@ -883,53 +960,66 @@ end;
{ --------------------------------------------------------------------
- TPullRequest
+ TPublishResponse
--------------------------------------------------------------------}
-Procedure TPullRequest.SetmaxMessages(AIndex : Integer; AValue : integer);
+Procedure TPublishResponse.SetmessageIds(AIndex : Integer; const AValue : TStringArray);
begin
- If (FmaxMessages=AValue) then exit;
- FmaxMessages:=AValue;
+ If (FmessageIds=AValue) then exit;
+ FmessageIds:=AValue;
MarkPropertyChanged(AIndex);
end;
-
-Procedure TPullRequest.SetreturnImmediately(AIndex : Integer; AValue : boolean);
+//2.6.4. bug workaround
+{$IFDEF VER2_6}
+Procedure TPublishResponse.SetArrayLength(Const AName : String; ALength : Longint);
begin
- If (FreturnImmediately=AValue) then exit;
- FreturnImmediately:=AValue;
- MarkPropertyChanged(AIndex);
+ Case AName of
+ 'messageids' : SetLength(FmessageIds,ALength);
+ else
+ Inherited SetArrayLength(AName,ALength);
+ end;
end;
-
+{$ENDIF VER2_6}
{ --------------------------------------------------------------------
- TPullResponse
+ TListTopicsResponse
--------------------------------------------------------------------}
-Procedure TPullResponse.SetreceivedMessages(AIndex : Integer; AValue : TPullResponseTypereceivedMessagesArray);
+Procedure TListTopicsResponse.Settopics(AIndex : Integer; const AValue : TListTopicsResponseTypetopicsArray);
begin
- If (FreceivedMessages=AValue) then exit;
- FreceivedMessages:=AValue;
+ If (Ftopics=AValue) then exit;
+ Ftopics:=AValue;
+ MarkPropertyChanged(AIndex);
+end;
+
+
+
+Procedure TListTopicsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
+
+begin
+ If (FnextPageToken=AValue) then exit;
+ FnextPageToken:=AValue;
MarkPropertyChanged(AIndex);
end;
//2.6.4. bug workaround
{$IFDEF VER2_6}
-Procedure TPullResponse.SetArrayLength(Const AName : String; ALength : Longint);
+Procedure TListTopicsResponse.SetArrayLength(Const AName : String; ALength : Longint);
begin
Case AName of
- 'receivedmessages' : SetLength(FreceivedMessages,ALength);
+ 'topics' : SetLength(Ftopics,ALength);
else
Inherited SetArrayLength(AName,ALength);
end;
@@ -940,78 +1030,88 @@ end;
{ --------------------------------------------------------------------
- TPushConfigTypeattributes
+ TListTopicSubscriptionsResponse
--------------------------------------------------------------------}
-Class Function TPushConfigTypeattributes.AllowAdditionalProperties : Boolean;
+Procedure TListTopicSubscriptionsResponse.Setsubscriptions(AIndex : Integer; const AValue : TStringArray);
begin
- Result:=True;
+ If (Fsubscriptions=AValue) then exit;
+ Fsubscriptions:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-{ --------------------------------------------------------------------
- TPushConfig
- --------------------------------------------------------------------}
-
-
-Procedure TPushConfig.Setattributes(AIndex : Integer; AValue : TPushConfigTypeattributes);
+Procedure TListTopicSubscriptionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
begin
- If (Fattributes=AValue) then exit;
- Fattributes:=AValue;
+ If (FnextPageToken=AValue) then exit;
+ FnextPageToken:=AValue;
MarkPropertyChanged(AIndex);
end;
-
-Procedure TPushConfig.SetpushEndpoint(AIndex : Integer; const AValue : String);
+//2.6.4. bug workaround
+{$IFDEF VER2_6}
+Procedure TListTopicSubscriptionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
begin
- If (FpushEndpoint=AValue) then exit;
- FpushEndpoint:=AValue;
- MarkPropertyChanged(AIndex);
+ Case AName of
+ 'subscriptions' : SetLength(Fsubscriptions,ALength);
+ else
+ Inherited SetArrayLength(AName,ALength);
+ end;
end;
+{$ENDIF VER2_6}
+
+
+
+{ --------------------------------------------------------------------
+ TEmpty
+ --------------------------------------------------------------------}
{ --------------------------------------------------------------------
- TReceivedMessage
+ TSubscription
--------------------------------------------------------------------}
-Procedure TReceivedMessage.SetackId(AIndex : Integer; const AValue : String);
+Procedure TSubscription.Setname(AIndex : Integer; const AValue : String);
begin
- If (FackId=AValue) then exit;
- FackId:=AValue;
+ If (Fname=AValue) then exit;
+ Fname:=AValue;
MarkPropertyChanged(AIndex);
end;
-Procedure TReceivedMessage.Setmessage(AIndex : Integer; AValue : TPubsubMessage);
+Procedure TSubscription.Settopic(AIndex : Integer; const AValue : String);
begin
- If (Fmessage=AValue) then exit;
- Fmessage:=AValue;
+ If (Ftopic=AValue) then exit;
+ Ftopic:=AValue;
MarkPropertyChanged(AIndex);
end;
+Procedure TSubscription.SetpushConfig(AIndex : Integer; const AValue : TPushConfig);
+begin
+ If (FpushConfig=AValue) then exit;
+ FpushConfig:=AValue;
+ MarkPropertyChanged(AIndex);
+end;
-{ --------------------------------------------------------------------
- TSubscription
- --------------------------------------------------------------------}
-Procedure TSubscription.SetackDeadlineSeconds(AIndex : Integer; AValue : integer);
+Procedure TSubscription.SetackDeadlineSeconds(AIndex : Integer; const AValue : integer);
begin
If (FackDeadlineSeconds=AValue) then exit;
@@ -1021,31 +1121,41 @@ end;
-Procedure TSubscription.Setname(AIndex : Integer; const AValue : String);
+
+
+{ --------------------------------------------------------------------
+ TPushConfigTypeattributes
+ --------------------------------------------------------------------}
+
+
+Class Function TPushConfigTypeattributes.AllowAdditionalProperties : Boolean;
begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
+ Result:=True;
end;
-Procedure TSubscription.SetpushConfig(AIndex : Integer; AValue : TPushConfig);
+{ --------------------------------------------------------------------
+ TPushConfig
+ --------------------------------------------------------------------}
+
+
+Procedure TPushConfig.SetpushEndpoint(AIndex : Integer; const AValue : String);
begin
- If (FpushConfig=AValue) then exit;
- FpushConfig:=AValue;
+ If (FpushEndpoint=AValue) then exit;
+ FpushEndpoint:=AValue;
MarkPropertyChanged(AIndex);
end;
-Procedure TSubscription.Settopic(AIndex : Integer; const AValue : String);
+Procedure TPushConfig.Setattributes(AIndex : Integer; const AValue : TPushConfigTypeattributes);
begin
- If (Ftopic=AValue) then exit;
- Ftopic:=AValue;
+ If (Fattributes=AValue) then exit;
+ Fattributes:=AValue;
MarkPropertyChanged(AIndex);
end;
@@ -1054,174 +1164,216 @@ end;
{ --------------------------------------------------------------------
- TTopic
+ TListSubscriptionsResponse
--------------------------------------------------------------------}
-Procedure TTopic.Setname(AIndex : Integer; const AValue : String);
+Procedure TListSubscriptionsResponse.Setsubscriptions(AIndex : Integer; const AValue : TListSubscriptionsResponseTypesubscriptionsArray);
begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
+ If (Fsubscriptions=AValue) then exit;
+ Fsubscriptions:=AValue;
+ MarkPropertyChanged(AIndex);
+end;
+
+
+
+Procedure TListSubscriptionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
+
+begin
+ If (FnextPageToken=AValue) then exit;
+ FnextPageToken:=AValue;
MarkPropertyChanged(AIndex);
end;
+//2.6.4. bug workaround
+{$IFDEF VER2_6}
+Procedure TListSubscriptionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
+
+begin
+ Case AName of
+ 'subscriptions' : SetLength(Fsubscriptions,ALength);
+ else
+ Inherited SetArrayLength(AName,ALength);
+ end;
+end;
+{$ENDIF VER2_6}
+
{ --------------------------------------------------------------------
- TProjectsSubscriptionsResource
+ TModifyAckDeadlineRequest
--------------------------------------------------------------------}
-Class Function TProjectsSubscriptionsResource.ResourceName : String;
+Procedure TModifyAckDeadlineRequest.SetackIds(AIndex : Integer; const AValue : TStringArray);
begin
- Result:='subscriptions';
+ If (FackIds=AValue) then exit;
+ FackIds:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-Class Function TProjectsSubscriptionsResource.DefaultAPI : TGoogleAPIClass;
+
+
+Procedure TModifyAckDeadlineRequest.SetackDeadlineSeconds(AIndex : Integer; const AValue : integer);
begin
- Result:=TpubsubAPI;
+ If (FackDeadlineSeconds=AValue) then exit;
+ FackDeadlineSeconds:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-Function TProjectsSubscriptionsResource.Acknowledge(subscription: string; aAcknowledgeRequest : TAcknowledgeRequest) : TEmpty;
-Const
- _HTTPMethod = 'POST';
- _Path = '{+subscription}:acknowledge';
- _Methodid = 'pubsub.projects.subscriptions.acknowledge';
-
-Var
- _P : String;
+//2.6.4. bug workaround
+{$IFDEF VER2_6}
+Procedure TModifyAckDeadlineRequest.SetArrayLength(Const AName : String; ALength : Longint);
begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aAcknowledgeRequest,TEmpty) as TEmpty;
+ Case AName of
+ 'ackids' : SetLength(FackIds,ALength);
+ else
+ Inherited SetArrayLength(AName,ALength);
+ end;
end;
+{$ENDIF VER2_6}
-Function TProjectsSubscriptionsResource.Create(_name: string; aSubscription : TSubscription) : TSubscription;
-Const
- _HTTPMethod = 'PUT';
- _Path = '{+name}';
- _Methodid = 'pubsub.projects.subscriptions.create';
-Var
- _P : String;
+
+{ --------------------------------------------------------------------
+ TAcknowledgeRequest
+ --------------------------------------------------------------------}
+
+
+Procedure TAcknowledgeRequest.SetackIds(AIndex : Integer; const AValue : TStringArray);
begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aSubscription,TSubscription) as TSubscription;
+ If (FackIds=AValue) then exit;
+ FackIds:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-Function TProjectsSubscriptionsResource.Delete(subscription: string) : TEmpty;
-
-Const
- _HTTPMethod = 'DELETE';
- _Path = '{+subscription}';
- _Methodid = 'pubsub.projects.subscriptions.delete';
-Var
- _P : String;
+//2.6.4. bug workaround
+{$IFDEF VER2_6}
+Procedure TAcknowledgeRequest.SetArrayLength(Const AName : String; ALength : Longint);
begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
+ Case AName of
+ 'ackids' : SetLength(FackIds,ALength);
+ else
+ Inherited SetArrayLength(AName,ALength);
+ end;
end;
+{$ENDIF VER2_6}
-Function TProjectsSubscriptionsResource.Get(subscription: string) : TSubscription;
-Const
- _HTTPMethod = 'GET';
- _Path = '{+subscription}';
- _Methodid = 'pubsub.projects.subscriptions.get';
-Var
- _P : String;
+
+{ --------------------------------------------------------------------
+ TPullRequest
+ --------------------------------------------------------------------}
+
+
+Procedure TPullRequest.SetreturnImmediately(AIndex : Integer; const AValue : boolean);
begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TSubscription) as TSubscription;
+ If (FreturnImmediately=AValue) then exit;
+ FreturnImmediately:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-Function TProjectsSubscriptionsResource.List(project: string; AQuery : string = '') : TListSubscriptionsResponse;
-Const
- _HTTPMethod = 'GET';
- _Path = '{+project}/subscriptions';
- _Methodid = 'pubsub.projects.subscriptions.list';
-Var
- _P : String;
+Procedure TPullRequest.SetmaxMessages(AIndex : Integer; const AValue : integer);
begin
- _P:=SubstitutePath(_Path,['project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListSubscriptionsResponse) as TListSubscriptionsResponse;
+ If (FmaxMessages=AValue) then exit;
+ FmaxMessages:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-Function TProjectsSubscriptionsResource.List(project: string; AQuery : TProjectsSubscriptionslistOptions) : TListSubscriptionsResponse;
-Var
- _Q : String;
+
+
+{ --------------------------------------------------------------------
+ TPullResponse
+ --------------------------------------------------------------------}
+
+
+Procedure TPullResponse.SetreceivedMessages(AIndex : Integer; const AValue : TPullResponseTypereceivedMessagesArray);
begin
- _Q:='';
- AddToQuery(_Q,'pageSize',AQuery.pageSize);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(project,_Q);
+ If (FreceivedMessages=AValue) then exit;
+ FreceivedMessages:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-Function TProjectsSubscriptionsResource.ModifyAckDeadline(subscription: string; aModifyAckDeadlineRequest : TModifyAckDeadlineRequest) : TEmpty;
-Const
- _HTTPMethod = 'POST';
- _Path = '{+subscription}:modifyAckDeadline';
- _Methodid = 'pubsub.projects.subscriptions.modifyAckDeadline';
+//2.6.4. bug workaround
+{$IFDEF VER2_6}
+Procedure TPullResponse.SetArrayLength(Const AName : String; ALength : Longint);
-Var
- _P : String;
+begin
+ Case AName of
+ 'receivedmessages' : SetLength(FreceivedMessages,ALength);
+ else
+ Inherited SetArrayLength(AName,ALength);
+ end;
+end;
+{$ENDIF VER2_6}
+
+
+
+
+{ --------------------------------------------------------------------
+ TReceivedMessage
+ --------------------------------------------------------------------}
+
+
+Procedure TReceivedMessage.SetackId(AIndex : Integer; const AValue : String);
begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aModifyAckDeadlineRequest,TEmpty) as TEmpty;
+ If (FackId=AValue) then exit;
+ FackId:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-Function TProjectsSubscriptionsResource.ModifyPushConfig(subscription: string; aModifyPushConfigRequest : TModifyPushConfigRequest) : TEmpty;
-Const
- _HTTPMethod = 'POST';
- _Path = '{+subscription}:modifyPushConfig';
- _Methodid = 'pubsub.projects.subscriptions.modifyPushConfig';
-Var
- _P : String;
+Procedure TReceivedMessage.Setmessage(AIndex : Integer; const AValue : TPubsubMessage);
begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aModifyPushConfigRequest,TEmpty) as TEmpty;
+ If (Fmessage=AValue) then exit;
+ Fmessage:=AValue;
+ MarkPropertyChanged(AIndex);
end;
-Function TProjectsSubscriptionsResource.Pull(subscription: string; aPullRequest : TPullRequest) : TPullResponse;
-Const
- _HTTPMethod = 'POST';
- _Path = '{+subscription}:pull';
- _Methodid = 'pubsub.projects.subscriptions.pull';
-Var
- _P : String;
+
+
+{ --------------------------------------------------------------------
+ TModifyPushConfigRequest
+ --------------------------------------------------------------------}
+
+
+Procedure TModifyPushConfigRequest.SetpushConfig(AIndex : Integer; const AValue : TPushConfig);
begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aPullRequest,TPullResponse) as TPullResponse;
+ If (FpushConfig=AValue) then exit;
+ FpushConfig:=AValue;
+ MarkPropertyChanged(AIndex);
end;
+
+
{ --------------------------------------------------------------------
TProjectsTopicsSubscriptionsResource
--------------------------------------------------------------------}
@@ -1243,7 +1395,7 @@ Function TProjectsTopicsSubscriptionsResource.List(topic: string; AQuery : strin
Const
_HTTPMethod = 'GET';
- _Path = '{+topic}/subscriptions';
+ _Path = 'v1/{+topic}/subscriptions';
_Methodid = 'pubsub.projects.topics.subscriptions.list';
Var
@@ -1286,11 +1438,56 @@ begin
Result:=TpubsubAPI;
end;
+Function TProjectsTopicsResource.SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
+
+Const
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+resource}:setIamPolicy';
+ _Methodid = 'pubsub.projects.topics.setIamPolicy';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['resource',resource]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aSetIamPolicyRequest,TPolicy) as TPolicy;
+end;
+
+Function TProjectsTopicsResource.GetIamPolicy(resource: string) : TPolicy;
+
+Const
+ _HTTPMethod = 'GET';
+ _Path = 'v1/{+resource}:getIamPolicy';
+ _Methodid = 'pubsub.projects.topics.getIamPolicy';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['resource',resource]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPolicy) as TPolicy;
+end;
+
+Function TProjectsTopicsResource.TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
+
+Const
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+resource}:testIamPermissions';
+ _Methodid = 'pubsub.projects.topics.testIamPermissions';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['resource',resource]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aTestIamPermissionsRequest,TTestIamPermissionsResponse) as TTestIamPermissionsResponse;
+end;
+
Function TProjectsTopicsResource.Create(_name: string; aTopic : TTopic) : TTopic;
Const
_HTTPMethod = 'PUT';
- _Path = '{+name}';
+ _Path = 'v1/{+name}';
_Methodid = 'pubsub.projects.topics.create';
Var
@@ -1301,26 +1498,26 @@ begin
Result:=ServiceCall(_HTTPMethod,_P,'',aTopic,TTopic) as TTopic;
end;
-Function TProjectsTopicsResource.Delete(topic: string) : TEmpty;
+Function TProjectsTopicsResource.Publish(topic: string; aPublishRequest : TPublishRequest) : TPublishResponse;
Const
- _HTTPMethod = 'DELETE';
- _Path = '{+topic}';
- _Methodid = 'pubsub.projects.topics.delete';
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+topic}:publish';
+ _Methodid = 'pubsub.projects.topics.publish';
Var
_P : String;
begin
_P:=SubstitutePath(_Path,['topic',topic]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
+ Result:=ServiceCall(_HTTPMethod,_P,'',aPublishRequest,TPublishResponse) as TPublishResponse;
end;
Function TProjectsTopicsResource.Get(topic: string) : TTopic;
Const
_HTTPMethod = 'GET';
- _Path = '{+topic}';
+ _Path = 'v1/{+topic}';
_Methodid = 'pubsub.projects.topics.get';
Var
@@ -1335,7 +1532,7 @@ Function TProjectsTopicsResource.List(project: string; AQuery : string = '') : T
Const
_HTTPMethod = 'GET';
- _Path = '{+project}/topics';
+ _Path = 'v1/{+project}/topics';
_Methodid = 'pubsub.projects.topics.list';
Var
@@ -1359,19 +1556,19 @@ begin
Result:=List(project,_Q);
end;
-Function TProjectsTopicsResource.Publish(topic: string; aPublishRequest : TPublishRequest) : TPublishResponse;
+Function TProjectsTopicsResource.Delete(topic: string) : TEmpty;
Const
- _HTTPMethod = 'POST';
- _Path = '{+topic}:publish';
- _Methodid = 'pubsub.projects.topics.publish';
+ _HTTPMethod = 'DELETE';
+ _Path = 'v1/{+topic}';
+ _Methodid = 'pubsub.projects.topics.delete';
Var
_P : String;
begin
_P:=SubstitutePath(_Path,['topic',topic]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aPublishRequest,TPublishResponse) as TPublishResponse;
+ Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
end;
@@ -1401,44 +1598,217 @@ end;
{ --------------------------------------------------------------------
- TProjectsResource
+ TProjectsSubscriptionsResource
--------------------------------------------------------------------}
-Class Function TProjectsResource.ResourceName : String;
+Class Function TProjectsSubscriptionsResource.ResourceName : String;
begin
- Result:='projects';
+ Result:='subscriptions';
end;
-Class Function TProjectsResource.DefaultAPI : TGoogleAPIClass;
+Class Function TProjectsSubscriptionsResource.DefaultAPI : TGoogleAPIClass;
begin
Result:=TpubsubAPI;
end;
+Function TProjectsSubscriptionsResource.SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
+Const
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+resource}:setIamPolicy';
+ _Methodid = 'pubsub.projects.subscriptions.setIamPolicy';
-Function TProjectsResource.GetSubscriptionsInstance : TProjectsSubscriptionsResource;
+Var
+ _P : String;
begin
- if (FSubscriptionsInstance=Nil) then
- FSubscriptionsInstance:=CreateSubscriptionsResource;
- Result:=FSubscriptionsInstance;
+ _P:=SubstitutePath(_Path,['resource',resource]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aSetIamPolicyRequest,TPolicy) as TPolicy;
end;
-Function TProjectsResource.CreateSubscriptionsResource : TProjectsSubscriptionsResource;
+Function TProjectsSubscriptionsResource.GetIamPolicy(resource: string) : TPolicy;
+
+Const
+ _HTTPMethod = 'GET';
+ _Path = 'v1/{+resource}:getIamPolicy';
+ _Methodid = 'pubsub.projects.subscriptions.getIamPolicy';
+
+Var
+ _P : String;
begin
- Result:=CreateSubscriptionsResource(Self);
+ _P:=SubstitutePath(_Path,['resource',resource]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPolicy) as TPolicy;
end;
+Function TProjectsSubscriptionsResource.TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
-Function TProjectsResource.CreateSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;
+Const
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+resource}:testIamPermissions';
+ _Methodid = 'pubsub.projects.subscriptions.testIamPermissions';
+
+Var
+ _P : String;
begin
- Result:=TProjectsSubscriptionsResource.Create(AOwner);
- Result.API:=Self.API;
+ _P:=SubstitutePath(_Path,['resource',resource]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aTestIamPermissionsRequest,TTestIamPermissionsResponse) as TTestIamPermissionsResponse;
+end;
+
+Function TProjectsSubscriptionsResource.Create(_name: string; aSubscription : TSubscription) : TSubscription;
+
+Const
+ _HTTPMethod = 'PUT';
+ _Path = 'v1/{+name}';
+ _Methodid = 'pubsub.projects.subscriptions.create';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['name',_name]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aSubscription,TSubscription) as TSubscription;
+end;
+
+Function TProjectsSubscriptionsResource.Get(subscription: string) : TSubscription;
+
+Const
+ _HTTPMethod = 'GET';
+ _Path = 'v1/{+subscription}';
+ _Methodid = 'pubsub.projects.subscriptions.get';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['subscription',subscription]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TSubscription) as TSubscription;
+end;
+
+Function TProjectsSubscriptionsResource.List(project: string; AQuery : string = '') : TListSubscriptionsResponse;
+
+Const
+ _HTTPMethod = 'GET';
+ _Path = 'v1/{+project}/subscriptions';
+ _Methodid = 'pubsub.projects.subscriptions.list';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['project',project]);
+ Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListSubscriptionsResponse) as TListSubscriptionsResponse;
+end;
+
+
+Function TProjectsSubscriptionsResource.List(project: string; AQuery : TProjectsSubscriptionslistOptions) : TListSubscriptionsResponse;
+
+Var
+ _Q : String;
+
+begin
+ _Q:='';
+ AddToQuery(_Q,'pageSize',AQuery.pageSize);
+ AddToQuery(_Q,'pageToken',AQuery.pageToken);
+ Result:=List(project,_Q);
+end;
+
+Function TProjectsSubscriptionsResource.Delete(subscription: string) : TEmpty;
+
+Const
+ _HTTPMethod = 'DELETE';
+ _Path = 'v1/{+subscription}';
+ _Methodid = 'pubsub.projects.subscriptions.delete';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['subscription',subscription]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
+end;
+
+Function TProjectsSubscriptionsResource.ModifyAckDeadline(subscription: string; aModifyAckDeadlineRequest : TModifyAckDeadlineRequest) : TEmpty;
+
+Const
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+subscription}:modifyAckDeadline';
+ _Methodid = 'pubsub.projects.subscriptions.modifyAckDeadline';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['subscription',subscription]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aModifyAckDeadlineRequest,TEmpty) as TEmpty;
+end;
+
+Function TProjectsSubscriptionsResource.Acknowledge(subscription: string; aAcknowledgeRequest : TAcknowledgeRequest) : TEmpty;
+
+Const
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+subscription}:acknowledge';
+ _Methodid = 'pubsub.projects.subscriptions.acknowledge';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['subscription',subscription]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aAcknowledgeRequest,TEmpty) as TEmpty;
+end;
+
+Function TProjectsSubscriptionsResource.Pull(subscription: string; aPullRequest : TPullRequest) : TPullResponse;
+
+Const
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+subscription}:pull';
+ _Methodid = 'pubsub.projects.subscriptions.pull';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['subscription',subscription]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aPullRequest,TPullResponse) as TPullResponse;
+end;
+
+Function TProjectsSubscriptionsResource.ModifyPushConfig(subscription: string; aModifyPushConfigRequest : TModifyPushConfigRequest) : TEmpty;
+
+Const
+ _HTTPMethod = 'POST';
+ _Path = 'v1/{+subscription}:modifyPushConfig';
+ _Methodid = 'pubsub.projects.subscriptions.modifyPushConfig';
+
+Var
+ _P : String;
+
+begin
+ _P:=SubstitutePath(_Path,['subscription',subscription]);
+ Result:=ServiceCall(_HTTPMethod,_P,'',aModifyPushConfigRequest,TEmpty) as TEmpty;
+end;
+
+
+
+{ --------------------------------------------------------------------
+ TProjectsResource
+ --------------------------------------------------------------------}
+
+
+Class Function TProjectsResource.ResourceName : String;
+
+begin
+ Result:='projects';
+end;
+
+Class Function TProjectsResource.DefaultAPI : TGoogleAPIClass;
+
+begin
+ Result:=TpubsubAPI;
end;
@@ -1491,6 +1861,30 @@ end;
+Function TProjectsResource.GetSubscriptionsInstance : TProjectsSubscriptionsResource;
+
+begin
+ if (FSubscriptionsInstance=Nil) then
+ FSubscriptionsInstance:=CreateSubscriptionsResource;
+ Result:=FSubscriptionsInstance;
+end;
+
+Function TProjectsResource.CreateSubscriptionsResource : TProjectsSubscriptionsResource;
+
+begin
+ Result:=CreateSubscriptionsResource(Self);
+end;
+
+
+Function TProjectsResource.CreateSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;
+
+begin
+ Result:=TProjectsSubscriptionsResource.Create(AOwner);
+ Result.API:=Self.API;
+end;
+
+
+
{ --------------------------------------------------------------------
TPubsubAPI
--------------------------------------------------------------------}
@@ -1504,19 +1898,19 @@ end;
Class Function TPubsubAPI.APIVersion : String;
begin
- Result:='v1beta2';
+ Result:='v1';
end;
Class Function TPubsubAPI.APIRevision : String;
begin
- Result:='20150427';
+ Result:='20160317';
end;
Class Function TPubsubAPI.APIID : String;
begin
- Result:='pubsub:v1beta2';
+ Result:='pubsub:v1';
end;
Class Function TPubsubAPI.APITitle : String;
@@ -1558,7 +1952,7 @@ end;
Class Function TPubsubAPI.APIdocumentationLink : String;
begin
- Result:='';
+ Result:='https://cloud.google.com/pubsub/docs';
end;
Class Function TPubsubAPI.APIrootUrl : string;
@@ -1570,13 +1964,13 @@ end;
Class Function TPubsubAPI.APIbasePath : string;
begin
- Result:='/v1beta2/';
+ Result:='';
end;
Class Function TPubsubAPI.APIbaseURL : String;
begin
- Result:='https://pubsub.googleapis.com/v1beta2/';
+ Result:='https://pubsub.googleapis.com/';
end;
Class Function TPubsubAPI.APIProtocol : string;
@@ -1588,7 +1982,7 @@ end;
Class Function TPubsubAPI.APIservicePath : string;
begin
- Result:='v1beta2/';
+ Result:='';
end;
Class Function TPubsubAPI.APIbatchPath : String;
@@ -1617,51 +2011,32 @@ end;
Class Procedure TPubsubAPI.RegisterAPIResources;
begin
- TAcknowledgeRequest.RegisterObject;
- TEmpty.RegisterObject;
- TListSubscriptionsResponse.RegisterObject;
- TListTopicSubscriptionsResponse.RegisterObject;
- TListTopicsResponse.RegisterObject;
- TModifyAckDeadlineRequest.RegisterObject;
- TModifyPushConfigRequest.RegisterObject;
+ TSetIamPolicyRequest.RegisterObject;
+ TPolicy.RegisterObject;
+ TBinding.RegisterObject;
+ TTestIamPermissionsRequest.RegisterObject;
+ TTestIamPermissionsResponse.RegisterObject;
+ TTopic.RegisterObject;
TPublishRequest.RegisterObject;
- TPublishResponse.RegisterObject;
TPubsubMessageTypeattributes.RegisterObject;
TPubsubMessage.RegisterObject;
- TPullRequest.RegisterObject;
- TPullResponse.RegisterObject;
+ TPublishResponse.RegisterObject;
+ TListTopicsResponse.RegisterObject;
+ TListTopicSubscriptionsResponse.RegisterObject;
+ TEmpty.RegisterObject;
+ TSubscription.RegisterObject;
TPushConfigTypeattributes.RegisterObject;
TPushConfig.RegisterObject;
+ TListSubscriptionsResponse.RegisterObject;
+ TModifyAckDeadlineRequest.RegisterObject;
+ TAcknowledgeRequest.RegisterObject;
+ TPullRequest.RegisterObject;
+ TPullResponse.RegisterObject;
TReceivedMessage.RegisterObject;
- TSubscription.RegisterObject;
- TTopic.RegisterObject;
-end;
-
-
-Function TPubsubAPI.GetProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;
-
-begin
- if (FProjectsSubscriptionsInstance=Nil) then
- FProjectsSubscriptionsInstance:=CreateProjectsSubscriptionsResource;
- Result:=FProjectsSubscriptionsInstance;
-end;
-
-Function TPubsubAPI.CreateProjectsSubscriptionsResource : TProjectsSubscriptionsResource;
-
-begin
- Result:=CreateProjectsSubscriptionsResource(Self);
-end;
-
-
-Function TPubsubAPI.CreateProjectsSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;
-
-begin
- Result:=TProjectsSubscriptionsResource.Create(AOwner);
- Result.API:=Self.API;
+ TModifyPushConfigRequest.RegisterObject;
end;
-
Function TPubsubAPI.GetProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
begin
@@ -1710,6 +2085,30 @@ end;
+Function TPubsubAPI.GetProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;
+
+begin
+ if (FProjectsSubscriptionsInstance=Nil) then
+ FProjectsSubscriptionsInstance:=CreateProjectsSubscriptionsResource;
+ Result:=FProjectsSubscriptionsInstance;
+end;
+
+Function TPubsubAPI.CreateProjectsSubscriptionsResource : TProjectsSubscriptionsResource;
+
+begin
+ Result:=CreateProjectsSubscriptionsResource(Self);
+end;
+
+
+Function TPubsubAPI.CreateProjectsSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;
+
+begin
+ Result:=TProjectsSubscriptionsResource.Create(AOwner);
+ Result.API:=Self.API;
+end;
+
+
+
Function TPubsubAPI.GetProjectsInstance : TProjectsResource;
begin