Package cloud.google.com/go/shopping/merchant/notifications/apiv1beta/notificationspb (v0.8.0)

Variables

Resource_name, Resource_value

var (
	Resource_name = map[int32]string{
		0: "RESOURCE_UNSPECIFIED",
		1: "PRODUCT",
	}
	Resource_value = map[string]int32{
		"RESOURCE_UNSPECIFIED": 0,
		"PRODUCT":              1,
	}
)

Enum value maps for Resource.

Attribute_name, Attribute_value

var (
	Attribute_name = map[int32]string{
		0: "ATTRIBUTE_UNSPECIFIED",
		1: "STATUS",
	}
	Attribute_value = map[string]int32{
		"ATTRIBUTE_UNSPECIFIED": 0,
		"STATUS":                1,
	}
)

Enum value maps for Attribute.

NotificationSubscription_NotificationEventType_name, NotificationSubscription_NotificationEventType_value

var (
	NotificationSubscription_NotificationEventType_name = map[int32]string{
		0: "NOTIFICATION_EVENT_TYPE_UNSPECIFIED",
		1: "PRODUCT_STATUS_CHANGE",
	}
	NotificationSubscription_NotificationEventType_value = map[string]int32{
		"NOTIFICATION_EVENT_TYPE_UNSPECIFIED": 0,
		"PRODUCT_STATUS_CHANGE":               1,
	}
)

Enum value maps for NotificationSubscription_NotificationEventType.

File_google_shopping_merchant_notifications_v1beta_notificationsapi_proto

var File_google_shopping_merchant_notifications_v1beta_notificationsapi_proto protoreflect.FileDescriptor

Functions

func RegisterNotificationsApiServiceServer

func RegisterNotificationsApiServiceServer(s *grpc.Server, srv NotificationsApiServiceServer)

Attribute

type Attribute int32

Enum to specify the attribute in the resource that is being changed to notify the merchant about.

Attribute_ATTRIBUTE_UNSPECIFIED, Attribute_STATUS

const (
	// Unspecified attribute
	Attribute_ATTRIBUTE_UNSPECIFIED Attribute = 0
	// Status of the changed entity
	Attribute_STATUS Attribute = 1
)

func (Attribute) Descriptor

func (Attribute) Descriptor() protoreflect.EnumDescriptor

func (Attribute) Enum

func (x Attribute) Enum() *Attribute

func (Attribute) EnumDescriptor

func (Attribute) EnumDescriptor() ([]byte, []int)

Deprecated: Use Attribute.Descriptor instead.

func (Attribute) Number

func (x Attribute) Number() protoreflect.EnumNumber

func (Attribute) String

func (x Attribute) String() string

func (Attribute) Type

CreateNotificationSubscriptionRequest

type CreateNotificationSubscriptionRequest struct {
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`

	NotificationSubscription *NotificationSubscription "" /* 133 byte string literal not displayed */

}

Request message for the CreateNotificationSubscription method.

func (*CreateNotificationSubscriptionRequest) Descriptor

func (*CreateNotificationSubscriptionRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateNotificationSubscriptionRequest.ProtoReflect.Descriptor instead.

func (*CreateNotificationSubscriptionRequest) GetNotificationSubscription

func (x *CreateNotificationSubscriptionRequest) GetNotificationSubscription() *NotificationSubscription

func (*CreateNotificationSubscriptionRequest) GetParent

func (*CreateNotificationSubscriptionRequest) ProtoMessage

func (*CreateNotificationSubscriptionRequest) ProtoMessage()

func (*CreateNotificationSubscriptionRequest) ProtoReflect

func (*CreateNotificationSubscriptionRequest) Reset

func (*CreateNotificationSubscriptionRequest) String

DeleteNotificationSubscriptionRequest

type DeleteNotificationSubscriptionRequest struct {

	// Required. The name of the notification subscription to be deleted.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request message for the DeleteNotificationSubscription method.

func (*DeleteNotificationSubscriptionRequest) Descriptor

func (*DeleteNotificationSubscriptionRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteNotificationSubscriptionRequest.ProtoReflect.Descriptor instead.

func (*DeleteNotificationSubscriptionRequest) GetName

func (*DeleteNotificationSubscriptionRequest) ProtoMessage

func (*DeleteNotificationSubscriptionRequest) ProtoMessage()

func (*DeleteNotificationSubscriptionRequest) ProtoReflect

func (*DeleteNotificationSubscriptionRequest) Reset

func (*DeleteNotificationSubscriptionRequest) String

GetNotificationSubscriptionRequest

type GetNotificationSubscriptionRequest struct {

	// Required. The `name` of the notification subscription.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request message for the GetNotificationSubscription method.

func (*GetNotificationSubscriptionRequest) Descriptor

func (*GetNotificationSubscriptionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetNotificationSubscriptionRequest.ProtoReflect.Descriptor instead.

func (*GetNotificationSubscriptionRequest) GetName

func (*GetNotificationSubscriptionRequest) ProtoMessage

func (*GetNotificationSubscriptionRequest) ProtoMessage()

func (*GetNotificationSubscriptionRequest) ProtoReflect

func (*GetNotificationSubscriptionRequest) Reset

func (*GetNotificationSubscriptionRequest) String

ListNotificationSubscriptionsRequest

type ListNotificationSubscriptionsRequest struct {

	// Required. The merchant account who owns the notification subscriptions.
	// Format: `accounts/{account}`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// The maximum number of notification subscriptions to return in a page.
	// The default value for `page_size` is 100. The
	// maximum value is `200`. Values above `200` will be coerced to `200`.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Token (if provided) to retrieve the subsequent page. All other parameters
	// must match the original call that provided the page token.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request message for the ListNotificationSubscription method.

func (*ListNotificationSubscriptionsRequest) Descriptor

func (*ListNotificationSubscriptionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListNotificationSubscriptionsRequest.ProtoReflect.Descriptor instead.

func (*ListNotificationSubscriptionsRequest) GetPageSize

func (*ListNotificationSubscriptionsRequest) GetPageToken

func (x *ListNotificationSubscriptionsRequest) GetPageToken() string

func (*ListNotificationSubscriptionsRequest) GetParent

func (*ListNotificationSubscriptionsRequest) ProtoMessage

func (*ListNotificationSubscriptionsRequest) ProtoMessage()

func (*ListNotificationSubscriptionsRequest) ProtoReflect

func (*ListNotificationSubscriptionsRequest) Reset

func (*ListNotificationSubscriptionsRequest) String

ListNotificationSubscriptionsResponse

type ListNotificationSubscriptionsResponse struct {
	NotificationSubscriptions []*NotificationSubscription "" /* 136 byte string literal not displayed */

	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`

}

Response message for the ListNotificationSubscription method.

func (*ListNotificationSubscriptionsResponse) Descriptor

func (*ListNotificationSubscriptionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListNotificationSubscriptionsResponse.ProtoReflect.Descriptor instead.

func (*ListNotificationSubscriptionsResponse) GetNextPageToken

func (x *ListNotificationSubscriptionsResponse) GetNextPageToken() string

func (*ListNotificationSubscriptionsResponse) GetNotificationSubscriptions

func (x *ListNotificationSubscriptionsResponse) GetNotificationSubscriptions() []*NotificationSubscription

func (*ListNotificationSubscriptionsResponse) ProtoMessage

func (*ListNotificationSubscriptionsResponse) ProtoMessage()

func (*ListNotificationSubscriptionsResponse) ProtoReflect

func (*ListNotificationSubscriptionsResponse) Reset

func (*ListNotificationSubscriptionsResponse) String

NotificationSubscription

type NotificationSubscription struct {
	InterestedIn isNotificationSubscription_InterestedIn `protobuf_oneof:"interested_in"`

	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`

	RegisteredEvent NotificationSubscription_NotificationEventType "" /* 205 byte string literal not displayed */

	CallBackUri string `protobuf:"bytes,5,opt,name=call_back_uri,json=callBackUri,proto3" json:"call_back_uri,omitempty"`

}

Represents a notification subscription owned by a Merchant account.

func (*NotificationSubscription) Descriptor

func (*NotificationSubscription) Descriptor() ([]byte, []int)

Deprecated: Use NotificationSubscription.ProtoReflect.Descriptor instead.

func (*NotificationSubscription) GetAllManagedAccounts

func (x *NotificationSubscription) GetAllManagedAccounts() bool

func (*NotificationSubscription) GetCallBackUri

func (x *NotificationSubscription) GetCallBackUri() string

func (*NotificationSubscription) GetInterestedIn

func (m *NotificationSubscription) GetInterestedIn() isNotificationSubscription_InterestedIn

func (*NotificationSubscription) GetName

func (x *NotificationSubscription) GetName() string

func (*NotificationSubscription) GetRegisteredEvent

func (*NotificationSubscription) GetTargetAccount

func (x *NotificationSubscription) GetTargetAccount() string

func (*NotificationSubscription) ProtoMessage

func (*NotificationSubscription) ProtoMessage()

func (*NotificationSubscription) ProtoReflect

func (x *NotificationSubscription) ProtoReflect() protoreflect.Message

func (*NotificationSubscription) Reset

func (x *NotificationSubscription) Reset()

func (*NotificationSubscription) String

func (x *NotificationSubscription) String() string

NotificationSubscription_AllManagedAccounts

type NotificationSubscription_AllManagedAccounts struct {
	// If this value is true, the requesting account is notified of the
	// specified event for all managed accounts (can be subaccounts or other
	// linked accounts) including newly added accounts on a daily basis.
	AllManagedAccounts bool `protobuf:"varint,3,opt,name=all_managed_accounts,json=allManagedAccounts,proto3,oneof"`
}

NotificationSubscription_NotificationEventType

type NotificationSubscription_NotificationEventType int32

Represents the event type that the merchant is interested in receiving notifications for.

NotificationSubscription_NOTIFICATION_EVENT_TYPE_UNSPECIFIED, NotificationSubscription_PRODUCT_STATUS_CHANGE

const (
	// Notifications event type is unspecified.
	NotificationSubscription_NOTIFICATION_EVENT_TYPE_UNSPECIFIED NotificationSubscription_NotificationEventType = 0
	// Notification of product status changes, for example when product becomes
	// disapproved.
	NotificationSubscription_PRODUCT_STATUS_CHANGE NotificationSubscription_NotificationEventType = 1
)

func (NotificationSubscription_NotificationEventType) Descriptor

func (NotificationSubscription_NotificationEventType) Enum

func (NotificationSubscription_NotificationEventType) EnumDescriptor

Deprecated: Use NotificationSubscription_NotificationEventType.Descriptor instead.

func (NotificationSubscription_NotificationEventType) Number

func (NotificationSubscription_NotificationEventType) String

func (NotificationSubscription_NotificationEventType) Type

NotificationSubscription_TargetAccount

type NotificationSubscription_TargetAccount struct {
	// The `name` of the account you want to receive notifications for.
	// Format: `accounts/{account}`
	TargetAccount string `protobuf:"bytes,4,opt,name=target_account,json=targetAccount,proto3,oneof"`
}

NotificationsApiServiceClient

type NotificationsApiServiceClient interface {
	// Gets notification subscriptions for an account.
	GetNotificationSubscription(ctx context.Context, in *GetNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error)
	// Creates a notification subscription for a merchant. We will allow the
	// following types of notification subscriptions to exist together (per
	// merchant as a subscriber per event type):
	// 1. Subscription for all managed accounts + subscription for self
	// 2. Multiple "partial" subscriptions for managed accounts + subscription
	// for self
	//
	// we will not allow (per merchant as a subscriber per event type):
	// 1. multiple self subscriptions.
	// 2. multiple "all managed accounts" subscriptions.
	// 3. all and partial subscriptions at the same time.
	// 4. multiple partial subscriptions for the same target account
	CreateNotificationSubscription(ctx context.Context, in *CreateNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error)
	// Updates an existing notification subscription for a merchant.
	UpdateNotificationSubscription(ctx context.Context, in *UpdateNotificationSubscriptionRequest, opts ...grpc.CallOption) (*NotificationSubscription, error)
	// Deletes a notification subscription for a merchant.
	DeleteNotificationSubscription(ctx context.Context, in *DeleteNotificationSubscriptionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Gets all the notification subscriptions for a merchant.
	ListNotificationSubscriptions(ctx context.Context, in *ListNotificationSubscriptionsRequest, opts ...grpc.CallOption) (*ListNotificationSubscriptionsResponse, error)
}

NotificationsApiServiceClient is the client API for NotificationsApiService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNotificationsApiServiceClient

func NewNotificationsApiServiceClient(cc grpc.ClientConnInterface) NotificationsApiServiceClient

NotificationsApiServiceServer

type NotificationsApiServiceServer interface {
	// Gets notification subscriptions for an account.
	GetNotificationSubscription(context.Context, *GetNotificationSubscriptionRequest) (*NotificationSubscription, error)
	// Creates a notification subscription for a merchant. We will allow the
	// following types of notification subscriptions to exist together (per
	// merchant as a subscriber per event type):
	// 1. Subscription for all managed accounts + subscription for self
	// 2. Multiple "partial" subscriptions for managed accounts + subscription
	// for self
	//
	// we will not allow (per merchant as a subscriber per event type):
	// 1. multiple self subscriptions.
	// 2. multiple "all managed accounts" subscriptions.
	// 3. all and partial subscriptions at the same time.
	// 4. multiple partial subscriptions for the same target account
	CreateNotificationSubscription(context.Context, *CreateNotificationSubscriptionRequest) (*NotificationSubscription, error)
	// Updates an existing notification subscription for a merchant.
	UpdateNotificationSubscription(context.Context, *UpdateNotificationSubscriptionRequest) (*NotificationSubscription, error)
	// Deletes a notification subscription for a merchant.
	DeleteNotificationSubscription(context.Context, *DeleteNotificationSubscriptionRequest) (*emptypb.Empty, error)
	// Gets all the notification subscriptions for a merchant.
	ListNotificationSubscriptions(context.Context, *ListNotificationSubscriptionsRequest) (*ListNotificationSubscriptionsResponse, error)
}

NotificationsApiServiceServer is the server API for NotificationsApiService service.

ProductChange

type ProductChange struct {
	OldValue *string `protobuf:"bytes,1,opt,name=old_value,json=oldValue,proto3,oneof" json:"old_value,omitempty"`

	NewValue *string `protobuf:"bytes,2,opt,name=new_value,json=newValue,proto3,oneof" json:"new_value,omitempty"`

	RegionCode *string `protobuf:"bytes,3,opt,name=region_code,json=regionCode,proto3,oneof" json:"region_code,omitempty"`

	ReportingContext *typepb.ReportingContext_ReportingContextEnum "" /* 180 byte string literal not displayed */

}

The change that happened to the product including old value, new value, country code as the region code and reporting context.

func (*ProductChange) Descriptor

func (*ProductChange) Descriptor() ([]byte, []int)

Deprecated: Use ProductChange.ProtoReflect.Descriptor instead.

func (*ProductChange) GetNewValue

func (x *ProductChange) GetNewValue() string

func (*ProductChange) GetOldValue

func (x *ProductChange) GetOldValue() string

func (*ProductChange) GetRegionCode

func (x *ProductChange) GetRegionCode() string

func (*ProductChange) GetReportingContext

func (*ProductChange) ProtoMessage

func (*ProductChange) ProtoMessage()

func (*ProductChange) ProtoReflect

func (x *ProductChange) ProtoReflect() protoreflect.Message

func (*ProductChange) Reset

func (x *ProductChange) Reset()

func (*ProductChange) String

func (x *ProductChange) String() string

ProductStatusChangeMessage

type ProductStatusChangeMessage struct {
	Account *string `protobuf:"bytes,1,opt,name=account,proto3,oneof" json:"account,omitempty"`

	ManagingAccount *string `protobuf:"bytes,2,opt,name=managing_account,json=managingAccount,proto3,oneof" json:"managing_account,omitempty"`

	ResourceType *Resource "" /* 164 byte string literal not displayed */

	Attribute *Attribute "" /* 139 byte string literal not displayed */

	Changes []*ProductChange `protobuf:"bytes,5,rep,name=changes,proto3" json:"changes,omitempty"`

	ResourceId *string `protobuf:"bytes,6,opt,name=resource_id,json=resourceId,proto3,oneof" json:"resource_id,omitempty"`

	Resource *string `protobuf:"bytes,7,opt,name=resource,proto3,oneof" json:"resource,omitempty"`

}

The message that the merchant will receive to notify about product status change event

func (*ProductStatusChangeMessage) Descriptor

func (*ProductStatusChangeMessage) Descriptor() ([]byte, []int)

Deprecated: Use ProductStatusChangeMessage.ProtoReflect.Descriptor instead.

func (*ProductStatusChangeMessage) GetAccount

func (x *ProductStatusChangeMessage) GetAccount() string

func (*ProductStatusChangeMessage) GetAttribute

func (x *ProductStatusChangeMessage) GetAttribute() Attribute

func (*ProductStatusChangeMessage) GetChanges

func (x *ProductStatusChangeMessage) GetChanges() []*ProductChange

func (*ProductStatusChangeMessage) GetManagingAccount

func (x *ProductStatusChangeMessage) GetManagingAccount() string

func (*ProductStatusChangeMessage) GetResource

func (x *ProductStatusChangeMessage) GetResource() string

func (*ProductStatusChangeMessage) GetResourceId

func (x *ProductStatusChangeMessage) GetResourceId() string

func (*ProductStatusChangeMessage) GetResourceType

func (x *ProductStatusChangeMessage) GetResourceType() Resource

func (*ProductStatusChangeMessage) ProtoMessage

func (*ProductStatusChangeMessage) ProtoMessage()

func (*ProductStatusChangeMessage) ProtoReflect

func (*ProductStatusChangeMessage) Reset

func (x *ProductStatusChangeMessage) Reset()

func (*ProductStatusChangeMessage) String

func (x *ProductStatusChangeMessage) String() string

Resource

type Resource int32

Enum to specify the resource that is being changed to notify the merchant about.

Resource_RESOURCE_UNSPECIFIED, Resource_PRODUCT

const (
	// Unspecified resource
	Resource_RESOURCE_UNSPECIFIED Resource = 0
	// Resource type : product
	Resource_PRODUCT Resource = 1
)

func (Resource) Descriptor

func (Resource) Descriptor() protoreflect.EnumDescriptor

func (Resource) Enum

func (x Resource) Enum() *Resource

func (Resource) EnumDescriptor

func (Resource) EnumDescriptor() ([]byte, []int)

Deprecated: Use Resource.Descriptor instead.

func (Resource) Number

func (x Resource) Number() protoreflect.EnumNumber

func (Resource) String

func (x Resource) String() string

func (Resource) Type

UnimplementedNotificationsApiServiceServer

type UnimplementedNotificationsApiServiceServer struct {
}

UnimplementedNotificationsApiServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedNotificationsApiServiceServer) CreateNotificationSubscription

func (*UnimplementedNotificationsApiServiceServer) DeleteNotificationSubscription

func (*UnimplementedNotificationsApiServiceServer) GetNotificationSubscription

func (*UnimplementedNotificationsApiServiceServer) ListNotificationSubscriptions

func (*UnimplementedNotificationsApiServiceServer) UpdateNotificationSubscription

UpdateNotificationSubscriptionRequest

type UpdateNotificationSubscriptionRequest struct {
	NotificationSubscription *NotificationSubscription "" /* 133 byte string literal not displayed */

	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`

}

Request message for the UpdateNotificationSubscription method.

func (*UpdateNotificationSubscriptionRequest) Descriptor

func (*UpdateNotificationSubscriptionRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateNotificationSubscriptionRequest.ProtoReflect.Descriptor instead.

func (*UpdateNotificationSubscriptionRequest) GetNotificationSubscription

func (x *UpdateNotificationSubscriptionRequest) GetNotificationSubscription() *NotificationSubscription

func (*UpdateNotificationSubscriptionRequest) GetUpdateMask

func (*UpdateNotificationSubscriptionRequest) ProtoMessage

func (*UpdateNotificationSubscriptionRequest) ProtoMessage()

func (*UpdateNotificationSubscriptionRequest) ProtoReflect

func (*UpdateNotificationSubscriptionRequest) Reset

func (*UpdateNotificationSubscriptionRequest) String